X-Git-Url: http://git.cyclocoop.org/?p=lhc%2Fweb%2Fwww.git;a=blobdiff_plain;f=www%2Fplugins-dist%2Fsafehtml%2Flib%2Fsafehtml%2Fclasses%2Fsafehtml.php;h=f906c435f73c91b62b7e1a2c2aaa2a018547784d;hp=837f013ae1f09e181265223a0f2a1239779691e6;hb=f08ec3a19775a7a173534b2d5cb7e9920b6253a6;hpb=58a2baa86ad2e12b4ff338d137f826a0a10ccbd7 diff --git a/www/plugins-dist/safehtml/lib/safehtml/classes/safehtml.php b/www/plugins-dist/safehtml/lib/safehtml/classes/safehtml.php index 837f013a..f906c435 100755 --- a/www/plugins-dist/safehtml/lib/safehtml/classes/safehtml.php +++ b/www/plugins-dist/safehtml/lib/safehtml/classes/safehtml.php @@ -165,8 +165,8 @@ class SafeHTML } } - $tempval = preg_replace('/&#(\d+);?/me', "chr('\\1')", $value); //"' - $tempval = preg_replace('/&#x([0-9a-f]+);?/mei', "chr(hexdec('\\1'))", $tempval); + $tempval = preg_replace_callback('/&#(\d+);?/m', create_function('$m', 'return chr($m[1]);'), $value); + $tempval = preg_replace_callback('/&#x([0-9a-f]+);?/mi', create_function('$m', 'return chr(hexdec($m[1]));'), $tempval); if ((in_array($name, $this->protocolAttributes)) && (strpos($tempval, ':') !== false))