Journal fields can render text enclosed within code tags as HTML.

Before you begin

  • Role required: any role that grants write access to a journal field
  • System property: the glide.ui.security.allow_codetag is set to the default value of true
    Note:

    To learn more about this property, see Allow JavaScript tags in embedded HTML (instance security hardening) in Instance Security Hardening Settings.

About this task

By default, a High Security Setting escapes any HTML code you type in a journal field by replacing it with its equivalent HTML entity value. Escaping causes the system to display HTML code as text rather than forwarding it to the browser as rendering instructions.

Procedure

  1. Enter [code][/code] tags around any code you want to render as HTML.
    Note: A single journal entry can contain multiple code tags as long as each code tag has a beginning and ending tag.
    For example, enter these lines:
    For more examples of HTML formatting options, see the blog post Formatting within Journal fields using HTML & [code] by a ServiceNow Technical Support Engineer in the ServiceNow Community.
  2. Click Post.
    Note: You cannot edit previous journal entries.

Result

The system renders the text within code tags as HTML.