]> arthur.barton.de Git - netdata.git/commitdiff
properly escape quotes in hipchat notifications
authorCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Fri, 17 Feb 2017 00:12:07 +0000 (02:12 +0200)
committerCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Fri, 17 Feb 2017 00:12:07 +0000 (02:12 +0200)
plugins.d/alarm-notify.sh

index 2bfe89e6ea722ad5f5060d9059336c8fc891407c..3a26ea74887833d6744711bab909ed30d5035007 100755 (executable)
@@ -1284,9 +1284,17 @@ SENT_PD=$?
 # -----------------------------------------------------------------------------
 # send hipchat message
 
-send_hipchat "${HIPCHAT_AUTH_TOKEN}" "${to_hipchat}" "<b>${alarm}</b> ${info_html}<br/>&nbsp;<br/><small><b>${chart}</b><br/>Chart<br/>&nbsp;</small><br/><small><b>${family}</b><br/>Family<br/>&nbsp;</small><br/><small><b>${severity}</b><br/>Severity<br/>&nbsp;</small><br/><small><b>${date}${raised_for_html}</b><br/>Time<br/>&nbsp;</small><br/><a href=\"${goto_url}\">View Netdata</a><br/>&nbsp;<br/><small><small>The source of this alarm is line ${src}</small></small>"
-SENT_HIPCHAT=$?
+send_hipchat "${HIPCHAT_AUTH_TOKEN}" "${to_hipchat}" "\
+<b>${alarm}</b> ${info_html}<br/>&nbsp;\
+<small><b>${chart}</b><br/>Chart<br/>&nbsp;</small>\
+<small><b>${family}</b><br/>Family<br/>&nbsp;</small>\
+<small><b>${severity}</b><br/>Severity<br/>&nbsp;</small>\
+<small><b>${date}${raised_for_html}</b><br/>Time<br/>&nbsp;</small>\
+<a href=\\\"${goto_url}\\\">View Netdata</a><br/>&nbsp;\
+<small><small>The source of this alarm is line ${src}</small></small>\
+"
 
+SENT_HIPCHAT=$?
 
 # -----------------------------------------------------------------------------
 # send the email