Details
-
Bug
-
Status: In Progress (View Workflow)
-
Minor
-
Resolution: Unresolved
-
Jenkins 2.60.3
Description
I am trying to send some messages using the Rocket.Chat notifier plugin that contains special characters such as ampersands. I use the Jenkins declarative pipeline syntax for this and the below snippet.
rocketSend(
channel: 'notification-channel',
message: "[Click here](http://www.example.com?param1=value1¶m2=value2¶m3=value3)",
rawMessage: true
)
However, despite having set rawMessage: true, the messages that are received have all & characters HTML escaped into & causing any links containing query parameters in the message body to be broken.
Thus in the above case, the body received will be
[Click here](http://www.example.com?param1=value1&param2=value2&param3=value3)
instead of being
[Click here](http://www.example.com?param1=value1¶m2=value2¶m3=value3)
Attachments
Activity
Field | Original Value | New Value |
---|---|---|
Description |
I am trying to send some messages using the Rocket.Chat notifier plugin that contains special characters such as ampersands. I use the Jenkins declarative pipeline syntax for this and the below snippet. {{rocketSend(}} {{ channel: 'notification-channel',}} {{ message: "[Click here](http://www.example.com?param1=value1¶m2=value2¶m3=value3)",}} {{ rawMessage: true}} {{)}} However, despite having set rawMessage: true, the messages that are received have all & characters HTML escaped into & causing any links containing query parameters in the message body to be broken. Thus in the above case, the body received will be {{[Click here](http://www.example.com?param1=value1&param2=value2&param3=value3)}} instead of being {{[Click here](http://www.example.com?param1=value1¶m2=value2¶m3=value3)}} |
I am trying to send some messages using the Rocket.Chat notifier plugin that contains special characters such as ampersands. I use the Jenkins declarative pipeline syntax for this and the below snippet. {{rocketSend(}} {{ channel: 'notification-channel',}} {{ message: "[Click here]([http://www.example.com?param1=value1¶m2=value2¶m3=value3|http://www.example.com/?param1=value1¶m2=value2¶m3=value3])",}} {{ rawMessage: true}} {{)}} However, despite having set {{rawMessage: true}}, the messages that are received have all & characters HTML escaped into & causing any links containing query parameters in the message body to be broken. Thus in the above case, the body received will be {{[Click here]([http://www.example.com?param1=value1&param2=value2&param3=value3|http://www.example.com/?param1=value1¶m2=value2¶m3=value3])}} instead of being {{[Click here]([http://www.example.com?param1=value1¶m2=value2¶m3=value3|http://www.example.com/?param1=value1¶m2=value2¶m3=value3])}} |
Summary | Unable to send messages containing ampersand character | Messages with ampersands are HTML escaped |
Assignee | Martin Reinhardt [ mreinhardt ] | Adarsh Ramamurthy [ adarshr ] |
Status | Open [ 1 ] | In Progress [ 3 ] |
Description |
I am trying to send some messages using the Rocket.Chat notifier plugin that contains special characters such as ampersands. I use the Jenkins declarative pipeline syntax for this and the below snippet. {{rocketSend(}} {{ channel: 'notification-channel',}} {{ message: "[Click here]([http://www.example.com?param1=value1¶m2=value2¶m3=value3|http://www.example.com/?param1=value1¶m2=value2¶m3=value3])",}} {{ rawMessage: true}} {{)}} However, despite having set {{rawMessage: true}}, the messages that are received have all & characters HTML escaped into & causing any links containing query parameters in the message body to be broken. Thus in the above case, the body received will be {{[Click here]([http://www.example.com?param1=value1&param2=value2&param3=value3|http://www.example.com/?param1=value1¶m2=value2¶m3=value3])}} instead of being {{[Click here]([http://www.example.com?param1=value1¶m2=value2¶m3=value3|http://www.example.com/?param1=value1¶m2=value2¶m3=value3])}} |
I am trying to send some messages using the Rocket.Chat notifier plugin that contains special characters such as ampersands. I use the Jenkins declarative pipeline syntax for this and the below snippet. {{rocketSend(}} {{ channel: 'notification-channel',}} {{ message: "[Click here]([http://www.example.com?param1=value1¶m2=value2¶m3=value3|http://www.example.com/?param1=value1¶m2=value2¶m3=value3])",}} {{ rawMessage: true}} {{)}} However, despite having set {{rawMessage: true}}, the messages that are received have all & characters HTML escaped into & causing any links containing query parameters in the message body to be broken. Thus in the above case, the body received will be {code:java} [Click here](http://www.example.com?param1=value1&param2=value2&param3=value3)  {code} instead of being {code:java} [Click here](http://www.example.com?param1=value1¶m2=value2¶m3=value3){code} |
Description |
I am trying to send some messages using the Rocket.Chat notifier plugin that contains special characters such as ampersands. I use the Jenkins declarative pipeline syntax for this and the below snippet. {{rocketSend(}} {{ channel: 'notification-channel',}} {{ message: "[Click here]([http://www.example.com?param1=value1¶m2=value2¶m3=value3|http://www.example.com/?param1=value1¶m2=value2¶m3=value3])",}} {{ rawMessage: true}} {{)}} However, despite having set {{rawMessage: true}}, the messages that are received have all & characters HTML escaped into & causing any links containing query parameters in the message body to be broken. Thus in the above case, the body received will be {code:java} [Click here](http://www.example.com?param1=value1&param2=value2&param3=value3)  {code} instead of being {code:java} [Click here](http://www.example.com?param1=value1¶m2=value2¶m3=value3){code} |
I am trying to send some messages using the Rocket.Chat notifier plugin that contains special characters such as ampersands. I use the Jenkins declarative pipeline syntax for this and the below snippet. {{rocketSend(}} {{ channel: 'notification-channel',}} {{ message: "[Click here]([http://www.example.com?param1=value1¶m2=value2¶m3=value3|http://www.example.com/?param1=value1¶m2=value2¶m3=value3])",}} {{ rawMessage: true}} {{)}} However, despite having set {{rawMessage: true}}, the messages that are received have all & characters HTML escaped into & causing any links containing query parameters in the message body to be broken. Thus in the above case, the body received will be {code:java} [Click here](http://www.example.com?param1=value1&param2=value2&param3=value3)  {code} instead of being {code:java} [Click here](http://www.example.com?param1=value1¶m2=value2¶m3=value3){code} |