mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-08-12 00:54:48 +02:00
[3.1.0] [BACKPORT] Fix bug with comments in styles, and some associated issues
- Restore printTokens() git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1570 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
@@ -15,3 +15,21 @@ function escapeHTML($string) {
|
||||
return $string;
|
||||
}
|
||||
|
||||
if (function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc()) {
|
||||
function fix_magic_quotes(&$array) {
|
||||
foreach ($array as $k => $val) {
|
||||
if (!is_array($val)) {
|
||||
$array[$k] = stripslashes($val);
|
||||
} else {
|
||||
fix_magic_quotes($array[$k]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fix_magic_quotes($_GET);
|
||||
fix_magic_quotes($_POST);
|
||||
fix_magic_quotes($_COOKIE);
|
||||
fix_magic_quotes($_REQUEST);
|
||||
fix_magic_quotes($_ENV);
|
||||
fix_magic_quotes($_SERVER);
|
||||
}
|
||||
|
Reference in New Issue
Block a user