#334 Properly escape quotes in canned responses/ticket templates
This commit is contained in:
parent
8c3324ead6
commit
63f0199f9e
@ -1973,7 +1973,9 @@ function hesk_printCanned()
|
||||
{
|
||||
$can_options .= '<option value="' . $mysaved[0] . '">' . $mysaved[1]. "</option>\n";
|
||||
if ($modsForHesk_settings['rich_text_for_tickets']) {
|
||||
echo 'myMsgTxt['.$mysaved[0].']=\''.str_replace("\r\n","\\r\\n' + \r\n'", hesk_html_entity_decode($mysaved[2]))."';\n";
|
||||
$theMessage = hesk_html_entity_decode($mysaved[2]);
|
||||
$theMessage = addslashes($theMessage);
|
||||
echo 'myMsgTxt['.$mysaved[0].']=\''.str_replace("\r\n","\\r\\n' + \r\n'", $theMessage)."';\n";
|
||||
} else {
|
||||
echo 'myMsgTxt['.$mysaved[0].']=\''.str_replace("\r\n","\\r\\n' + \r\n'", addslashes($mysaved[2]))."';\n";
|
||||
}
|
||||
|
||||
@ -161,7 +161,9 @@ function hesk_insertAtCursor(myField, myValue) {
|
||||
|
||||
$javascript_titles.='myTitle['.$mysaved['id'].']=\''.addslashes($mysaved['title'])."';\n";
|
||||
if ($modsForHesk_settings['rich_text_for_tickets']) {
|
||||
$javascript_messages.='myMsgTxt['.$mysaved['id'].']=\''.str_replace("\r\n","\\r\\n' + \r\n'", hesk_html_entity_decode($mysaved['message']) )."';\n";
|
||||
$theMessage = hesk_html_entity_decode($mysaved['message']);
|
||||
$theMessage = addslashes($theMessage);
|
||||
$javascript_messages.='myMsgTxt['.$mysaved['id'].']=\''.str_replace("\r\n","\\r\\n' + \r\n'", $theMessage )."';\n";
|
||||
} else {
|
||||
$javascript_messages.='myMsgTxt['.$mysaved['id'].']=\''.str_replace("\r\n","\\r\\n' + \r\n'", addslashes($mysaved['message']) )."';\n";
|
||||
}
|
||||
|
||||
@ -572,7 +572,9 @@ if (!$show['show']) {
|
||||
{
|
||||
$can_options .= '<option value="' . $mysaved[0] . '">' . $mysaved[1]. "</option>\n";
|
||||
if ($modsForHesk_settings['rich_text_for_tickets']) {
|
||||
echo 'myMsgTxt['.$mysaved[0].']=\''.str_replace("\r\n","\\r\\n' + \r\n'", hesk_html_entity_decode($mysaved[2]))."';\n";
|
||||
$theMessage = hesk_html_entity_decode($mysaved[2]);
|
||||
$theMessage = addslashes($theMessage);
|
||||
echo 'myMsgTxt['.$mysaved[0].']=\''.str_replace("\r\n","\\r\\n' + \r\n'", $theMessage)."';\n";
|
||||
} else {
|
||||
echo 'myMsgTxt['.$mysaved[0].']=\''.str_replace("\r\n","\\r\\n' + \r\n'", addslashes($mysaved[2]))."';\n";
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user