HFP-3465 Fix line breaks breaking metadata field validation (#109)

* Fix linebreaks breaking metadata field validation
* HFP-3465 Use "single line" flag for regexp
pull/113/merge
Oliver Tacke 2021-12-21 23:45:32 +01:00 committed by GitHub
parent 22115c0aea
commit d3d003e978
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

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