From 1a6ef6f0fa3db0a644d02a67dca640c1f9aba3d2 Mon Sep 17 00:00:00 2001 From: Svein-Tore Griff With Date: Fri, 8 Nov 2013 18:24:42 +0100 Subject: [PATCH] Why are we using | instead of / around the regex? Change to / so that we may use | inside the regex --- h5p.classes.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/h5p.classes.php b/h5p.classes.php index e2beb8e..f37a4c8 100644 --- a/h5p.classes.php +++ b/h5p.classes.php @@ -1240,7 +1240,7 @@ class H5PContentValidator { // Check if string is according to optional regexp in semantics if (isset($semantics->regexp)) { - $pattern = '|' . $semantics->regexp->pattern . '|'; + $pattern = '/' . $semantics->regexp->pattern . '/'; $pattern .= isset($semantics->regexp->modifiers) ? $semantics->regexp->modifiers : ''; if (preg_match($pattern, $text) === 0) { // Note: explicitly ignore return value FALSE, to avoid removing text