Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

H5P Iframe Embedder URL with space results in 404 #42

Open
jumabgz opened this issue Nov 23, 2022 · 0 comments
Open

H5P Iframe Embedder URL with space results in 404 #42

jumabgz opened this issue Nov 23, 2022 · 0 comments

Comments

@jumabgz
Copy link

jumabgz commented Nov 23, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant