mirror of
https://github.com/e107inc/e107.git
synced 2025-07-28 18:30:53 +02:00
Bugtracker #4149 - handle utf-8 in toAttribute()
This commit is contained in:
@@ -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,8 +643,9 @@ 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 = htmlspecialchars($text, ENT_QUOTES, CHARSET); // Xhtml compliance.
|
||||
if (!preg_match('/&#|\'|"|\(|\)|<|>/s', $text))
|
||||
{
|
||||
$text = $this->replaceConstants($text);
|
||||
return $text;
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user