mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 16:03:47 +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
d65066341b
commit
0904fb74b6
@ -412,7 +412,9 @@ $t = $t[0];
|
||||
if($t == '< '){return '< ';}
|
||||
if($t == '>'){return '>';}
|
||||
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]))])){
|
||||
return (($C['keep_bad']%2) ? str_replace(array('<', '>'), array('<', '>'), $t) : '');
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user