From d3d003e978ae361bcc5d2f0f36bb349923e61636 Mon Sep 17 00:00:00 2001 From: Oliver Tacke Date: Tue, 21 Dec 2021 23:45:32 +0100 Subject: [PATCH] HFP-3465 Fix line breaks breaking metadata field validation (#109) * Fix linebreaks breaking metadata field validation * HFP-3465 Use "single line" flag for regexp --- h5p.classes.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/h5p.classes.php b/h5p.classes.php index 4089f78..193d077 100644 --- a/h5p.classes.php +++ b/h5p.classes.php @@ -704,15 +704,15 @@ class H5PValidator { 'source' => '/^(http[s]?:\/\/.+)$/', 'license' => '/^(CC BY|CC BY-SA|CC BY-ND|CC BY-NC|CC BY-NC-SA|CC BY-NC-ND|CC0 1\.0|GNU GPL|PD|ODC PDDL|CC PDM|U|C)$/', 'licenseVersion' => '/^(1\.0|2\.0|2\.5|3\.0|4\.0)$/', - 'licenseExtras' => '/^.{1,5000}$/', + 'licenseExtras' => '/^.{1,5000}$/s', 'yearsFrom' => '/^([0-9]{1,4})$/', 'yearsTo' => '/^([0-9]{1,4})$/', 'changes' => array( 'date' => '/^[0-9]{2}-[0-9]{2}-[0-9]{2} [0-9]{1,2}:[0-9]{2}:[0-9]{2}$/', 'author' => '/^.{1,255}$/', - 'log' => '/^.{1,5000}$/' + 'log' => '/^.{1,5000}$/s' ), - 'authorComments' => '/^.{1,5000}$/', + 'authorComments' => '/^.{1,5000}$/s', 'w' => '/^[0-9]{1,4}$/', 'h' => '/^[0-9]{1,4}$/', // deprecated