733 views
After upgrading to Jakarta, you might notice that your custom UI Pages will not load, and you will see error messages that look something like:
 
"The element type "form" must be terminated by the matching end-tag </form>".
"The element type "h2" must be terminated by the matching end-tag </h2>".
etc.
 
The system logs will contain messages such as the following examples:
 
ftp://gsft_database_form/sys_ui_page.0d9bf9e4d7321100158ba6859e610342.html:2:92: <j:jelly> Intercepted dangerous value from Jelly expression about to be evaluated as JavaScript. Expression: gs.getMessage("Show all"), Value: Show all, File: null, Line: null: java.lang.SecurityException: Intercepted dangerous value from Jelly expression about to be evaluated as JavaScript. Expression: gs.getMessage("Show all"), Value: Show all, File: null, Line: null: com.glide.ui.jelly.GlideExpressionInterpolatedJS.evaluateLiteral(GlideExpressionInterpolatedJS.java:112)
com.glide.ui.jelly.GlideExpressionInterpolatedJS.evaluateAsString(GlideExpressionInterpolatedJS.java:87)
com.glide.ui.jelly.GlideExpressionScript.runWithEscaping(GlideExpressionScript.java:52)
com.glide.ui.jelly.GlideExpressionScript.run(GlideExpressionScript.java:39)
 
--
 
This issue occurs because a Jelly expression has not been marked 'SAFE'.
 
The system log gives us the sys_id of the UI Page, and the problematic Jelly expression gs.getMessage("Show all").
 
The issue is resolved by adding 'SAFE' to the Jelly Expression:
 
${SAFE:gs.getMessage("Show all")}
 
--
 
Keep in mind that there may be several expressions on the page that need modification.  You can keep reloading the UI Page and using the resulting System Log error to debug.
 
If a ServiceNow-provided UI Page is producing this error, then it is likely that the Jakarta update was skipped to preserve customer changes.  Applying the update you should address the issue.

Article Information

Last Updated:2017-11-16 21:33:43
Published:2017-11-17