
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-04-2017 05:25 AM
Hi there,
I am stuck for a good few hours with encoding the ampersand in Jelly so please if anyone knows a solution help me out
Basically I have a dynamic content block with two-phase Jelly.
The bit of code I am having trouble with:
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
[...]
<script>
[...]
//INCIDENTS
function openInc() {
alertarray[2] = 0;
$j('#gsft_main').attr('src', '/' + tables[1] + '$[AMP]sysparm_query=' + sources[2] + '^EQ');
}
function openInc2() {
alertarray[3] = 0;
$j('#gsft_main').attr('src', '/' + tables[1] + '$[AMP]sysparm_query=' + sources[3] + '^EQ');
}
[...]
</script>
</j:jelly>
I try to set the SRC for the iFrame to be a filtered list of incidents.
In the Chrome console, the src looks like this:
In ServiceNow, the iFrame gets rendered like this:
where does that @99@ even come from???
I tried everything - ${AMP}, $[AMP], &amp, even setting Jelly variable with <j:set> and passing it to the Javascript, everytime either the whole code gets broken and the block does not render at all or I get this weird @99@ output.
I really hope someone had a similar situation and managed to solve it? any suggestions? thanks!
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-04-2017 05:27 AM
Hi Tomasz,
Ampersand is not the right character and your URL is malformed, which could be part of the issue.
Try going to incident_list.do?sysparm_query...

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-04-2017 05:27 AM
Hi Tomasz,
Ampersand is not the right character and your URL is malformed, which could be part of the issue.
Try going to incident_list.do?sysparm_query...

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-04-2017 05:55 AM
I just realized the same thing hah! Thanks though for your swift assistance, as always
Yeah the issue must have been not the Jelly encoding but the rendering of the URL itself.