Closed jakub-bochenski closed 7 years ago
Which field of the notification message are we talking about? Do you have cards enabled? In case of cards, the body of the notification text (the one you see after dropdown) does not appear to support HTML elements at all.
I am using cards, however setting a message like this
<a href="$URL"><strong>$JOB_DISPLAY_NAME</strong> #$BUILD_NUMBER</a> <i>$CHANGES_OR_CAUSE</i> <br> $JOB_DESCRIPTION
results in a
, strong
, etc. tags being interpreted with only h4
from $JOB_DESCRIPTION
is passed literally
This is sadly not a plugin issue, sending the below JSON as a notification resulted in the same behavior:
{
"message": "foobar",
"card": {
"style": "application",
"description": {
"value": "Description",
"format": "html"
},
"format": "medium",
"url": "http://localhost:8080/jenkins",
"title": "Title",
"activity": {
"html": "Activity HTML <a href=\"http://localhost:8080\">link</a> <i>italic</i> <strong>STRONG</strong> <h4>header4</h4>"
},
"id": "foo-bar"
}
}
It looks like HipChat does not like the h4 tag in the activity/html JSON field.
We use https://wiki.jenkins-ci.org/display/JENKINS/OWASP+Markup+Formatter+Plugin which allows to set build and job descriptions in HTML.
Unfortunately using an expression like
$JOB_DESCRIPTION
for a job with descriptionresults in literal output
on hipchat.
I'd expect the html tags to be interpreted instead of escaped.