diff --git a/e107_handlers/e_parse_class.php b/e107_handlers/e_parse_class.php index eb3ccf626..754a9a5cf 100644 --- a/e107_handlers/e_parse_class.php +++ b/e107_handlers/e_parse_class.php @@ -11,8 +11,8 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/e107_handlers/e_parse_class.php,v $ -| $Revision: 1.16 $ -| $Date: 2007-10-04 19:08:38 $ +| $Revision: 1.17 $ +| $Date: 2007-10-16 19:05:24 $ | $Author: e107steved $ +----------------------------------------------------------------------------+ */ @@ -643,10 +643,11 @@ class e_parse function toAttribute($text) { $text = str_replace("&","&",$text); // URLs posted without HTML access may have an & in them. - $text = htmlspecialchars($text); // Xhtml compliance. - if (!preg_match('/&#|\'|"|\(|\)|<|>/s', $text)) { - $text = $this->replaceConstants($text); - return $text; + $text = htmlspecialchars($text, ENT_QUOTES, CHARSET); // Xhtml compliance. + if (!preg_match('/&#|\'|"|\(|\)|<|>/s', $text)) + { + $text = $this->replaceConstants($text); + return $text; } else { return ''; }