- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-06-2014 02:31 PM
Hello - on a UI Page a simple button should be able to reference special HTML characters, like the » raquo » but when saving the UI page the XML is rejected (can't save the UI page.. XML parse rejects it). I know the characters have to be escaped but having trouble figuring out the kludgy jelly syntax
HTML code works fine when not being created inside a UI page:
<a class="btn btn-primary" href="#" >Button Label »</a>
I've tried variations of this syntax: <a class="btn btn-primary" href="#" >Button Label ${&} raquo;} </a>
Its probably just a escape syntax issue as described here: How to Escape in Jelly - ServiceNow Wiki but haven't found the secret sauce to do this. Shouldn't be this hard to make work.........
Any help appreciated....
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-07-2014 02:30 AM
Hi dbhertel,
Use the below method : I have given a small script to display a button with label "Terms & Conditions" with an ampersand in between. Declare a jelly variable as shown below and you can call this jelly variable where ever necessary in the jelly tags:
<j2:set var="jvar_amp" value="&"/>
<button> Terms $[jvar_amp] conditions </button>
When this UI page content is tried, a button comes up with "Terms & conditions" as label.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-07-2014 02:30 AM
Hi dbhertel,
Use the below method : I have given a small script to display a button with label "Terms & Conditions" with an ampersand in between. Declare a jelly variable as shown below and you can call this jelly variable where ever necessary in the jelly tags:
<j2:set var="jvar_amp" value="&"/>
<button> Terms $[jvar_amp] conditions </button>
When this UI page content is tried, a button comes up with "Terms & conditions" as label.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-07-2014 01:05 PM
Thank you -- appreciate you sharing the secret sauce
I've combined the jelly variable with the 'raquo" directly after the jelly var and it renders the special char correctly. Thanks!