mirror of
https://github.com/e107inc/e107.git
synced 2025-07-29 02:40:25 +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).
|
| GNU General Public License (http://gnu.org).
|
||||||
|
|
|
|
||||||
| $Source: /cvs_backup/e107_0.8/e107_handlers/e_parse_class.php,v $
|
| $Source: /cvs_backup/e107_0.8/e107_handlers/e_parse_class.php,v $
|
||||||
| $Revision: 1.16 $
|
| $Revision: 1.17 $
|
||||||
| $Date: 2007-10-04 19:08:38 $
|
| $Date: 2007-10-16 19:05:24 $
|
||||||
| $Author: e107steved $
|
| $Author: e107steved $
|
||||||
+----------------------------------------------------------------------------+
|
+----------------------------------------------------------------------------+
|
||||||
*/
|
*/
|
||||||
@@ -643,8 +643,9 @@ class e_parse
|
|||||||
|
|
||||||
function toAttribute($text) {
|
function toAttribute($text) {
|
||||||
$text = str_replace("&","&",$text); // URLs posted without HTML access may have an & in them.
|
$text = str_replace("&","&",$text); // URLs posted without HTML access may have an & in them.
|
||||||
$text = htmlspecialchars($text); // Xhtml compliance.
|
$text = htmlspecialchars($text, ENT_QUOTES, CHARSET); // Xhtml compliance.
|
||||||
if (!preg_match('/&#|\'|"|\(|\)|<|>/s', $text)) {
|
if (!preg_match('/&#|\'|"|\(|\)|<|>/s', $text))
|
||||||
|
{
|
||||||
$text = $this->replaceConstants($text);
|
$text = $this->replaceConstants($text);
|
||||||
return $text;
|
return $text;
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user