You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have detected a problem with H5P Iframe Embedder working on Moodle. If I set a URL to a PDF that has a space in the filename and I store it in a moodle folder, H5P gives an error and does not show the content, resulting in 404 Not Found.
A 404 error will be displayed in DevTools (chrome. Firefox also fails).
In DevTools, if you analyze the URL that is being used to embed, you can find that it is encoding the %20 part of the URL as %2520. I think it encodes the original % itself as %25, resulting in %2520 and this is finally not recognized correctly and 404 is returned.
Actually, I detected the problem using the Interactive Book activity and in this one using Iframe Embedder, but in the end the problem seems to be in the latter.
This happens in Moodle 3.9.15, 3.11.8 and also in 4.0.4.
We have to take into account that the teacher normally does not write the URL by hand, he copies it from another site and that URL should be correct, it has the spaces encoded and does not require modification.
In this case, so that the teacher did not have to edit the URL, what we suggested was to remove the spaces in the filename of the uploaded file in moodle and then copy the URL, however, it is still something "weird" that the teacher must do it this way.
I'm just reporting it in case it was feasible for the H5P component to stop altering the URL in this way, with the intention that the user would only have to copy and paste a URL without paying attention to character encoding issues.
Regards
The text was updated successfully, but these errors were encountered:
Hello,
I have detected a problem with H5P Iframe Embedder working on Moodle. If I set a URL to a PDF that has a space in the filename and I store it in a moodle folder, H5P gives an error and does not show the content, resulting in 404 Not Found.
Steps to replicate it:
In DevTools, if you analyze the URL that is being used to embed, you can find that it is encoding the %20 part of the URL as %2520. I think it encodes the original % itself as %25, resulting in %2520 and this is finally not recognized correctly and 404 is returned.
Actually, I detected the problem using the Interactive Book activity and in this one using Iframe Embedder, but in the end the problem seems to be in the latter.
This happens in Moodle 3.9.15, 3.11.8 and also in 4.0.4.
As otacke stated here: "The iframe embedder in fact encodes the URI that is provided."
We have to take into account that the teacher normally does not write the URL by hand, he copies it from another site and that URL should be correct, it has the spaces encoded and does not require modification.
In this case, so that the teacher did not have to edit the URL, what we suggested was to remove the spaces in the filename of the uploaded file in moodle and then copy the URL, however, it is still something "weird" that the teacher must do it this way.
I'm just reporting it in case it was feasible for the H5P component to stop altering the URL in this way, with the intention that the user would only have to copy and paste a URL without paying attention to character encoding issues.
Regards
The text was updated successfully, but these errors were encountered: