|
From: Greg M. <bli...@us...> - 2008-08-23 01:49:31
|
Update of /cvsroot/phpwebsite-comm/modules/mailinglists/class In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29394/class Modified Files: Email.php Log Message: Added workaround for issue where emails could be sent with relative URLs. Index: Email.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/mailinglists/class/Email.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Email.php 22 Aug 2008 02:53:25 -0000 1.2 --- Email.php 23 Aug 2008 01:49:37 -0000 1.3 *************** *** 119,129 **** /* Support Smart Tags */ $text = PHPWS_Text::parseTag($this->msg_html); ! /* Need to add full URL since the text may be going in emails. */ ! $src = '@(src|href)="@'; ! $rpl = "\\1=\"$address"; ! $text = preg_replace($src, $rpl, $text); ! return PHPWS_Text::parseOutput($text); } --- 119,131 ---- /* Support Smart Tags */ $text = PHPWS_Text::parseTag($this->msg_html); + $text = PHPWS_Text::parseOutput($text); ! /* Need to add full URL since the text is going into emails. */ ! $src[] = '@(src|href)="\./@'; ! $rpl[] = "\\1=\"$address"; ! $src[] = '@(src|href)="(images|index.php)@'; ! $rpl[] = "\\1=\"$address\\2"; ! return preg_replace($src, $rpl, $text); } |