mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-08 22:40:23 +01:00
small alteration to make htmLawed respect keep_bad config value when tags are generally considered bad for not matching the regex (and not in any list of known tags)
This commit is contained in:
parent
2257ffb08a
commit
1d928dd98c
@ -412,7 +412,9 @@ $t = $t[0];
|
|||||||
if($t == '< '){return '< ';}
|
if($t == '< '){return '< ';}
|
||||||
if($t == '>'){return '>';}
|
if($t == '>'){return '>';}
|
||||||
if(!preg_match('`^<(/?)([a-zA-Z][a-zA-Z1-6]*)([^>]*?)\s?>$`m', $t, $m)){
|
if(!preg_match('`^<(/?)([a-zA-Z][a-zA-Z1-6]*)([^>]*?)\s?>$`m', $t, $m)){
|
||||||
return str_replace(array('<', '>'), array('<', '>'), $t);
|
//error_log(__METHOD__.__LINE__.' Keep Bad:'.$C['keep_bad'].'->'.array2string($t));
|
||||||
|
//return str_replace(array('<', '>'), array('<', '>'), $t);
|
||||||
|
return (($C['keep_bad']%2) ? str_replace(array('<', '>'), array('<', '>'), $t) : '');
|
||||||
}elseif(!isset($C['elements'][($e = strtolower($m[2]))])){
|
}elseif(!isset($C['elements'][($e = strtolower($m[2]))])){
|
||||||
return (($C['keep_bad']%2) ? str_replace(array('<', '>'), array('<', '>'), $t) : '');
|
return (($C['keep_bad']%2) ? str_replace(array('<', '>'), array('<', '>'), $t) : '');
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user