Fixing font-family regex pattern when validating text

pull/40/head
Cornel Les 2017-07-20 17:54:12 +03:00
parent 3a2cd46f6a
commit 75803f8dfb
1 changed files with 1 additions and 1 deletions

View File

@ -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';