Added support for two more font styling options

HFJ-1646
pull/18/head
Frode Petterson 2016-03-09 11:18:21 +01:00
parent 510016b1cc
commit 0218493eab
1 changed files with 6 additions and 0 deletions

View File

@ -2631,6 +2631,12 @@ class H5PContentValidator {
if (isset($semantics->font->background) && $semantics->font->background) { if (isset($semantics->font->background) && $semantics->font->background) {
$stylePatterns[] = '/^background-color: *(#[a-f0-9]{3}[a-f0-9]{3}?|rgba?\([0-9, ]+\)) *;?$/i'; $stylePatterns[] = '/^background-color: *(#[a-f0-9]{3}[a-f0-9]{3}?|rgba?\([0-9, ]+\)) *;?$/i';
} }
if (isset($semantics->font->spacing) && $semantics->font->spacing) {
$stylePatterns[] = '/^letter-spacing: *[0-9.]+(em|px|%) *;?$/i';
}
if (isset($semantics->font->height) && $semantics->font->height) {
$stylePatterns[] = '/^line-height: *[0-9.]+(em|px|%|) *;?$/i';
}
} }
// Aligment is allowed for all wysiwyg texts // Aligment is allowed for all wysiwyg texts