1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-05 14:17:49 +02:00

Bug #5139 - Single quote issue in text emails

This commit is contained in:
CaMer0n
2011-02-26 19:56:35 +00:00
parent b47800dbc3
commit b0b0551537

View File

@@ -477,7 +477,7 @@ class e107Email extends PHPMailer
}
if ($this->legacyBody && !preg_match('/<(font|br|a|img|b)/i', $message)) // Assume html if it includes one of these tags
{ // Otherwise assume its a plain text message which needs some conversion to render in HTML
$message = htmlspecialchars($message);
$message = htmlspecialchars($message,ENT_QUOTES,$this->CharSet);
$message = preg_replace('%(http|ftp|https)(://\S+)%', '<a href="\1\2">\1\2</a>', $message);
$message = preg_replace('/([[:space:]()[{}])(www.[-a-zA-Z0-9@:%_\+.~#?&\/\/=]+)/i', '\\1<a href="http://\\2">\\2</a>', $message);
$message = preg_replace('/([_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,3})/i', '<a href="mailto:\\1">\\1</a>', $message);