Certified Jenkins Engineer

Jenkins Administration and Monitoring Part 1

Demo Markup Formatters

In this guide, you’ll learn how to use the Jenkins Markup Formatter to add formatted text—including HTML tags—into Views, Jobs, Builds, and System Messages, while maintaining protection against cross-site scripting (XSS) attacks.

Default Formatter Behavior

By default, Jenkins uses the Plain Text formatter. It escapes all HTML tags and displays exactly what you type.

Note

The Plain Text formatter is safe but does not render any HTML. Switch to Safe HTML if you need styled markup.

Editing the System Message

  1. In Jenkins, navigate to Manage Jenkins > Configure System.
  2. Scroll down to System Message and enter your HTML. For example:
<strong style="color:red">Server maintenance scheduled at 10 PM UTC.</strong>
<ol>
  <li>Service A</li>
  <li>Service B</li>
</ol>

The image shows a Jenkins system configuration page with a system message editor open, displaying HTML-formatted text for a notification about server maintenance.

If you click Save or Apply now, the message still appears as plain text because the formatter is unchanged.

Changing the Markup Formatter

  1. Go to Manage Jenkins > Configure Global Security.
  2. Locate the Markup Formatter section.
  3. Change Plain Text to Safe HTML.

The image shows a Jenkins security configuration page with user roles and permissions, and options for markup formatting and agent settings.

  1. Click Save to apply.
FormatterDescriptionCommon Allowed Tags
Plain TextEscapes all HTML; displays raw input.
Safe HTMLSanitizes a predefined subset of tags to prevent XSS.<strong>, <em>, <ul>, <ol>, <li>

Warning

Safe HTML strips any disallowed tags or attributes. Avoid embedding <script> or inline event handlers.

The image shows a Jenkins security configuration screen with user permissions and settings for markup formatting and agent TCP ports. Various user roles have different permissions indicated by checkboxes.

Viewing the Rendered Message

Return to the Jenkins Dashboard. Your system message now displays with bold text, colors, and lists as defined by your HTML.

You can apply the same approach to:

  • Job descriptions
  • Build overviews
  • View headings

Further Reading & References

Watch Video

Watch video content

Previous
Global Security Settings