properly escape quotes in hipchat notifications
Costa Tsaousis (ktsaou) committed
Feb 17, 2017 at 02:12 UTC
9aec1b88d3d6a25fa68ab63f03c024cb54911017
1 file changed
+10
-2
plugins.d/alarm-notify.sh
+10
-2
@@ -1284,9 +1284,17 @@ SENT_PD=$?
1284
# -----------------------------------------------------------------------------
1285
# send hipchat message
1286
1287
-send_hipchat "${HIPCHAT_AUTH_TOKEN}" "${to_hipchat}" "<b>${alarm}</b> ${info_html}<br/> <br/><small><b>${chart}</b><br/>Chart<br/> </small><br/><small><b>${family}</b><br/>Family<br/> </small><br/><small><b>${severity}</b><br/>Severity<br/> </small><br/><small><b>${date}${raised_for_html}</b><br/>Time<br/> </small><br/><a href=\"${goto_url}\">View Netdata</a><br/> <br/><small><small>The source of this alarm is line ${src}</small></small>"
1288
-SENT_HIPCHAT=$?
1287
+send_hipchat "${HIPCHAT_AUTH_TOKEN}" "${to_hipchat}" "\
1288
+<b>${alarm}</b> ${info_html}<br/> \
1289
+<small><b>${chart}</b><br/>Chart<br/> </small>\
1290
+<small><b>${family}</b><br/>Family<br/> </small>\
1291
+<small><b>${severity}</b><br/>Severity<br/> </small>\
1292
+<small><b>${date}${raised_for_html}</b><br/>Time<br/> </small>\
1293
+<a href=\\\"${goto_url}\\\">View Netdata</a><br/> \
1294
+<small><small>The source of this alarm is line ${src}</small></small>\
1295
+"
1296
1297
+SENT_HIPCHAT=$?
1298
1299
# -----------------------------------------------------------------------------
1300
# send the email