This one may even work ...

git-svn-id: file:///svn/phpbb/branches/phpBB-2_0_0@3275 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Paul S. Owen 2003-01-08 11:26:52 +00:00
parent 9ff68ef0c2
commit 9d5ce51cfd

View file

@ -158,18 +158,18 @@ class emailer
if (preg_match('#^(Subject:(.*?))$#m', $this->msg, $match)) if (preg_match('#^(Subject:(.*?))$#m', $this->msg, $match))
{ {
$this->subject = (trim($match[2]) != '') ? trim($match[2]) : (($this->subject != '') ? $this->subject : 'No Subject'); $this->subject = (trim($match[2]) != '') ? trim($match[2]) : (($this->subject != '') ? $this->subject : 'No Subject');
$drop_header .= '[\r\n]*?' . $match[1]; $drop_header .= '[\r\n]*?' . phpbb_preg_quote($match[1], '#');
} }
if (preg_match('#^(Charset:(.*?))$#m', $this->msg, $match)) if (preg_match('#^(Charset:(.*?))$#m', $this->msg, $match))
{ {
$this->encoding = (trim($match[2]) != '') ? trim($match[2]) : trim($lang['ENCODING']); $this->encoding = (trim($match[2]) != '') ? trim($match[2]) : trim($lang['ENCODING']);
$drop_header .= '[\r\n]*?' . $match[1]; $drop_header .= '[\r\n]*?' . phpbb_preg_quote($match[1], '#');
} }
if ($drop_header != '') if ($drop_header != '')
{ {
$this->msg = trim(preg_replace('#' . phpbb_preg_quote($drop_header, '#') . '#s', '', $this->msg)); $this->msg = trim(preg_replace('#' . $drop_header . '#s', '', $this->msg));
} }
return true; return true;