mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-09 15:38:27 +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)
|
foreach ($attrarr as $arreach)
|
||||||
{
|
{
|
||||||
$current = $this->allowed_html[strtolower($element)][strtolower($arreach['name'])];
|
$current = $this->allowed_html[strtolower($element)][strtolower($arreach['name'])];
|
||||||
|
|
||||||
if ($current == '')
|
if ($current == '')
|
||||||
{
|
{
|
||||||
# the attribute is not allowed
|
# the attribute is not allowed
|
||||||
@ -623,6 +624,14 @@
|
|||||||
}
|
}
|
||||||
break;
|
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
|
} # switch
|
||||||
|
|
||||||
return $ok;
|
return $ok;
|
||||||
|
Loading…
Reference in New Issue
Block a user