mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
fix: Revert to using addslashes() for template parsing in alerts (#6661)
* fix: Revert to using addslashes() for template parsing in alerts * Update alerts.inc.php
This commit is contained in:
@@ -322,7 +322,7 @@ function GetContacts($results)
|
|||||||
function FormatAlertTpl($obj)
|
function FormatAlertTpl($obj)
|
||||||
{
|
{
|
||||||
$tpl = $obj["template"];
|
$tpl = $obj["template"];
|
||||||
$msg = '$ret .= "'.str_replace(array('{else}', '{/if}', '{/foreach}'), array('"; } else { $ret .= "', '"; } $ret .= "', '"; } $ret .= "'), str_replace("'", "\'", $tpl)).'";';
|
$msg = '$ret .= "'.str_replace(array('{else}', '{/if}', '{/foreach}'), array('"; } else { $ret .= "', '"; } $ret .= "', '"; } $ret .= "'), addslashes($tpl)).'";';
|
||||||
$parsed = $msg;
|
$parsed = $msg;
|
||||||
$s = strlen($msg);
|
$s = strlen($msg);
|
||||||
$x = $pos = -1;
|
$x = $pos = -1;
|
||||||
|
|||||||
Reference in New Issue
Block a user