mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-09 07:28:43 +01:00
added a new option, to filter the allowed attribute values by regular expression
This commit is contained in:
parent
a1abed870a
commit
4bc6ad098e
@ -329,6 +329,7 @@
|
||||
foreach ($attrarr as $arreach)
|
||||
{
|
||||
$current = $this->allowed_html[strtolower($element)][strtolower($arreach['name'])];
|
||||
|
||||
if ($current == '')
|
||||
{
|
||||
# the attribute is not allowed
|
||||
@ -623,6 +624,14 @@
|
||||
}
|
||||
break;
|
||||
|
||||
# The minval check checks that the attribute value is a positive integer,
|
||||
# and that it is not smaller than the given value.
|
||||
case 'match':
|
||||
if (!preg_match($checkvalue, $value)) {
|
||||
$ok = false;
|
||||
}
|
||||
break;
|
||||
|
||||
} # switch
|
||||
|
||||
return $ok;
|
||||
|
Loading…
Reference in New Issue
Block a user