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

Single quote issues #2

Open
vincenzocasu opened this issue Oct 14, 2015 · 5 comments
Open

Single quote issues #2

vincenzocasu opened this issue Oct 14, 2015 · 5 comments

Comments

@vincenzocasu
Copy link

Hi, I use flashcards module from latest WordPress plugin. I have updated all h5p libraries. The answer is marked as wrong when the string typed from users contains a single quote. I.e. if the right answer is l'automobile (in en-us language means the car), and is typed l'automobile in the field, this answer is marked ad wrong. Can you help me?

@falcon-git
Copy link
Member

Thank you for reporting! It seems you've run into a bug. We will fix this, but we won't be able to do it right away. If anyone else want's to fix this it probably has t do with H5P's security feature. We probably match an escaped version of the word with an unescaped version.

@vincenzocasu
Copy link
Author

Ok, but now what should i do to fix? I have seen that if i write the HTML
encoded sequence it match! For ' should be ' or something like this...
Thanks
Il 14/ott/2015 13:28, "Svein-Tore Griff With" notifications@github.com ha
scritto:

Thank you for reporting! It seems you've run into a bug. We will fix this,
but we won't be able to do it right away. If anyone else want's to fix this
it probably has t do with H5P's security feature. We probably match an
escaped version of the word with an unescaped version.


Reply to this email directly or view it on GitHub
#2 (comment).

@falcon-git
Copy link
Member

I don't think it will be easy for you to fix this, I think you'll have to
wait for a fixed code and avoid using single quote until we've fixed it :/

2015-10-14 17:28 GMT+02:00 realves notifications@github.com:

Ok, but now what should i do to fix? I have seen that if i write the HTML
encoded sequence it match! For ' should be ' or something like this...
Thanks
Il 14/ott/2015 13:28, "Svein-Tore Griff With" notifications@github.com
ha
scritto:

Thank you for reporting! It seems you've run into a bug. We will fix
this,
but we won't be able to do it right away. If anyone else want's to fix
this
it probably has t do with H5P's security feature. We probably match an
escaped version of the word with an unescaped version.


Reply to this email directly or view it on GitHub
#2 (comment).


Reply to this email directly or view it on GitHub
#2 (comment).

@vincenzocasu
Copy link
Author

Hi, I don't know if this is the best solution, but I have update your flashcards.js file with this code:

var userAnswer = H5P.trim($input.val()).toLowerCase();
userAnswer = userAnswer.replace("'", "'");

On line 156 and now it works!

@falcon-git
Copy link
Member

Great! (We will add a more generic version of that to the code - a version that handles all special charecters)

runarkasp added a commit that referenced this issue May 22, 2024
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

2 participants