Why does "&" in UI Pages fail in some ServiceNow instances and not in others?

clemens
Giga Expert

We are using UI Pages or specifically the XML definitions and we have one customer instance where the "&" fails while in all others, including during app certification it worked flawless.

The problem is with this line that creates a URL

myPage="/?CID=aaa1111&Embed=1";

which produced an error in one specific ServiceNow Helsinki instance. Everyone else is fine.

After lengthy troubleshooting, the customer found that replacing "&" with "${AMP}" would fix the problem.

Does anyone have any idea why it works on some instances and not on others? Is there a specific setting that disables the use of "&"?

Any suggestions?

Thanks a lot.

Here is an extract of the code. I took some parts out but this is what it looks like:

<?xml version="1.0" encoding="utf-8" ?>

<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">

  <g:evaluate jelly="true" var="myPage">

myPage="/?CID=aaa1111&amp;Embed=1";

  </g:evaluate>

  <!-- Navigate to the URL -->

  <script>

window.location=myPage;

  </script>

  <!-- Body to be displayed if the navigation fails. -->

  <body>

      This page should have navigated to the default ....

      <br/>

  </body>

</j:jelly>

3 REPLIES 3

aswinsiddaling2
Kilo Guru

Is there any difference between the servicenow instances where it fails and where it doesn't?


I would assume that there is a difference but we dont know. Each instance has different cmdb content, setup, users, etc. - so I am fairly certain it has something to do with some settings but I dont know which one or where to look and comparing multiple ServiceNow instances top to bottom manually is not really practical.


Please let me know if you get the root cause