Jenkins description Jenkins description jenkins jenkins

Jenkins description


As per this answer, Jenkins applies an HTML sanitisation policy by default, which only permits certain HTML tags and attributes. The <script> tag is not one of these.

However, the way in which these descriptions is displayed is pluggable.

If you want to use the <script> tag, you would need to install a formatter plugin like the "Anything Goes" Formatter — which does no stripping of HTML whatsoever (leading to the risk of XSS) — and then enable it in the main Jenkins config.


When you say "on the top of Jenkins", I'm assuming you mean the top of the job page within the Jenkins UI.

According to this bug report stripping all HTML tags started happening in 2010. (Hudson is the project Jenkins was forked from is 2011 or so).

I would imagine they are stripping the HTML on display of the page, so editing the files directly on the Jenkins server may not work either. I would look into using the Jenkins API to update the job description to display the information you need.

Another idea would be to create a user script that you would install within the browser. Then it would pull the status, and inject it into the Jenkins interface.


One way to do this is with browser user scripts with the Tampermonkey or GreaseMonkey - Firefox only plugins. Users would need plugin and your user scripts. This would allow you to fetch data, alter page DOM, etc.. to customize the Jenkins workflow or display. The scripts can be configured to only match certain hosts and urls.