Open JsBergbau opened 3 years ago
If you enter text in the field "Autor comments" and hit Enter a new line is generated, like here
In the JSON is then
"authorComments":"Test\nTest"
As long as the h5p stays in your LMS no problem, but when you try to import in another sytem it fails
I think the error is in https://github.com/h5p/h5p-php-library/blob/master/h5p.classes.php
'authorComments' => '/^.{1,5000}$/',
When you try it here https://regex101.com/r/IS3lUT/1 it finds no match. When you remove the second line, it matches again.
I've tried in course presentation and Find the words, in both this error occurs.
@JsBergbau I agree, the regular expression doesn't cover this case. Would your mind creating a pull request to fix the issue?
Done https://github.com/h5p/h5p-php-library/pull/97
@JsBergbau Cool! Hope the H5P core team will find time to take care of it soon.
If you enter text in the field "Autor comments" and hit Enter a new line is generated, like here
In the JSON is then
As long as the h5p stays in your LMS no problem, but when you try to import in another sytem it fails
I think the error is in https://github.com/h5p/h5p-php-library/blob/master/h5p.classes.php
When you try it here https://regex101.com/r/IS3lUT/1 it finds no match. When you remove the second line, it matches again.
I've tried in course presentation and Find the words, in both this error occurs.