mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-25 23:38:58 +01:00
further improvements regarding the quoting of preg special chars in signature used as pattern
This commit is contained in:
parent
d4088e79bb
commit
a43ec990cd
@ -1247,9 +1247,9 @@ class ajaxfelamimail
|
|||||||
if ($found !== false && $_oldSig != -2 && !(empty($oldSigText) || trim($bocompose->convertHTMLToText($oldSigText)) ==''))
|
if ($found !== false && $_oldSig != -2 && !(empty($oldSigText) || trim($bocompose->convertHTMLToText($oldSigText)) ==''))
|
||||||
{
|
{
|
||||||
//error_log(__METHOD__.'Old Content:'.$_content.'#');
|
//error_log(__METHOD__.'Old Content:'.$_content.'#');
|
||||||
$oldSigText = str_replace('~','\~',$oldSigText,$count);
|
$_oldSigText = preg_quote($oldSigText,'~');
|
||||||
$_content = preg_replace('~'.$oldSigText.'~si',$sigText,$_content,1);
|
//error_log(__METHOD__.'Old(masked):'.$_oldSigText.'#');
|
||||||
if ($count) $_content = str_replace('\~','~',$_content);
|
$_content = preg_replace('~'.$_oldSigText.'~mi',$sigText,$_content,1);
|
||||||
//error_log(__METHOD__.'new Content:'.$_content.'#');
|
//error_log(__METHOD__.'new Content:'.$_content.'#');
|
||||||
}
|
}
|
||||||
if ($_oldSig == -2 && (empty($oldSigText) || trim($bocompose->convertHTMLToText($oldSigText)) ==''))
|
if ($_oldSig == -2 && (empty($oldSigText) || trim($bocompose->convertHTMLToText($oldSigText)) ==''))
|
||||||
|
Loading…
Reference in New Issue
Block a user