Fixing font-family regex pattern when validating text
parent
3a2cd46f6a
commit
75803f8dfb
|
@ -3163,7 +3163,7 @@ class H5PContentValidator {
|
|||
$stylePatterns[] = '/^font-size: *[0-9.]+(em|px|%) *;?$/i';
|
||||
}
|
||||
if (isset($semantics->font->family) && $semantics->font->family) {
|
||||
$stylePatterns[] = '/^font-family: *[a-z0-9," ]+;?$/i';
|
||||
$stylePatterns[] = '/^font-family: *[-a-z0-9," ]+;?$/i';
|
||||
}
|
||||
if (isset($semantics->font->color) && $semantics->font->color) {
|
||||
$stylePatterns[] = '/^color: *(#[a-f0-9]{3}[a-f0-9]{3}?|rgba?\([0-9, ]+\)) *;?$/i';
|
||||
|
|
Loading…
Reference in New Issue