From 75803f8dfb3d249241ce00512055637aa2fbcf13 Mon Sep 17 00:00:00 2001 From: Cornel Les Date: Thu, 20 Jul 2017 17:54:12 +0300 Subject: [PATCH] Fixing font-family regex pattern when validating text --- h5p.classes.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/h5p.classes.php b/h5p.classes.php index 1cd94e2..f08eeb0 100644 --- a/h5p.classes.php +++ b/h5p.classes.php @@ -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';