Single quotes / apostrophes not correctly rendered in images alt tags and title tags

Hello !

I am a french user using H5P a loooot (1500+ contents already created). As you may know, french is a language that requires a massive use of the apostrophe - or do you say "single quote" in english ? (') and I have noticed that H5P does not handle it properly.

When I use the Question Set content-type (Quiz) on Wordpress (Version 6.1.1 ; H5P plugin up to date) and I insert an apostrophe / single quote in an image ALT tag or TITLE tag the character is rendered with the corresponding code - which is "&#039" apparently. (Look at the screencap for a better understanding I think ;p)

This problem happens in several content-types when I insert an image and use an apostrophe / single quote in the ALT tag or / and in the TITLE tag.

I hope that this report will help the team to resolve this tiny problem.

Isabelle

Content types: 
papi Jo's picture

There are quite a few places where the single quote/apostrophe appears as its HTML code instead of an apostrophe character. This minor nuisance has been often mentioned on the H5P forums but is not considered as a serious bug, so has not been given a priority status and probably will never be fixed.

As a workaround I suggest you use this character: ’

Unicode U+2019: GUILLEMET-APOSTROPHE Alt+0146 on a Windows keyboard.

 

otacke's picture

Hi!

I need to disappoint you, PapiJo ;-)

Actually, this was fixed in November (https://github.com/h5p/h5p-image/commit/2a31cbee86f04ed91b8846c45b04d8745407e1e0) and the fix should have been released on January 27 (https://h5p.org/post-hub-releases). Are you sure your libraries are up-to-date?

Best,

Oliver 

papi Jo's picture

Thanks for the info, Oliver. Currently the latest available version of Question set from the H5P hub is 1.20.7 so I'm up to date.

Actually, on my Drupal test site each time I want to create a new Question set content, it says "Update available", but it does not update, I remain at version 1.20.7. Strange.

otacke's picture

Hi!

The issue was not in Question Set, but in H5P.Image that is used to display the introductory images of subcontents. That's why I pointed to the commit that fixed the issue there.

Not so strange. @BJ: Pål seems to have not built the release file of QuestionSet correctly. Either way, H5P.Image would get updated by other libraries, too, so the (missing) update of QuestionSet set is not related to that problem (if it really persists).

BV52's picture

Hi Oliver,

Thanks for pointing this out. I have informed Pål about this issue.

-BV

BV52's picture

HI All,

The "update" issue should be resolved. On the other hand the fix for the apostrophe issue does not have a schedule yet but it should be right around the corner. You can check the release overview for latest updates.

-BV

Thanks for the update, BV. and for pointing out the "release overview" page which I didn't know about.

Have a nice day !

Isa

Hi Oliver !

My content types are all up to date but the update of Question Set is not working properly : the "update available" message stays no matter what. At first the update failed (same thing happened with other updates), but I kept trying and finally the update went OK or it only seemed... because the notice "update available" for Question Set is still showing on H5P hub (see screencaps 1 / 2 / 3). I have already rebuilt the H5P library's cache and the issue with the apostrophe / single quote in images alt / title tag on my quiz persists.

If I understand you correctly, it shouldn't because this issue was fixed on H5P.image lately and is not Question Set related. I can't find H5P.image in the H5P library's list on Wordpress ; should I access it with FTP and edit the file with the Github fix myself ?

Greetings,

Isa

otacke's picture

I just checked. The problem has in fact been fixed in H5P.Image, but the library H5P.Question that takes over displaying the images as part of the introduction still has the same problem. I'll propose a fix to the H5P core team later on.

I have accessed the H5P.Image-1.1 folder with FTP and the Github commit that you wrote to fix the apostrophe issue in image's alt / title tag (https://github.com/h5p/h5p-image/commit/2a31cbee86f04ed91b8846c45b04d874...) is there in image.js (screencap 1). So I don't understand why the issue persists on my Question Set content type as it shouldn't indeed.

By the way, the H5P.Image-1.0 folder is also showing up ; shouldn't it be erased after the update ? (screencap 2)

otacke's picture

Hi!

I have checked the code now. The bug has already been fixed on January 2 and the fix will be released with H5P.Question 1.5.5. No, I don't know when that will happen. Only the H5P core team can tell.

Not being able to update Question Set is a separate issue that BV addressed with the H5P core team already. Even an update of Question Set would not fix the bug now, neither an update of H5P.Image.

H5P.Image 1.0 is a different version of the H5P.Image library that may still be required by some other content type library/content, so it then would show up and cannot be deleted. The "funny" files from 2016 may be there for the same reason, you should check if libraries can be removed on the H5P library settings screen. There's a problem that currently some cannot be removed (so their dependencies might not), but that will hopefully be tackled soon.

Cheers,
Oliver

Waouh ! Thanks a lot, Oliver, for this very detailed and clear answer.

I am quite relieved that the issue with the apostrophe and with Question Set's update is not on my part, I must confess ;) It is not a big deal and, as far as the apostrophe goes on, Papi Jo's workaround will do the trick for me in the meantime.

> The "funny" files from 2016 may be there for the same reason, you should check if libraries can be removed on the H5P library settings screen. 

Well, I have indeed a lot of old libraries but they can't be removed from the settings screen (no delete button) and it seems that some activities (or dependencies) are using them, but when I click to see which are, I can have no clue (= empty page). I thought so far that it was designed this way on purpose but the libraries are indeed a bit messy (see some examples attached).

> There's a problem that currently some cannot be removed (so their dependencies might not), but that will hopefully be tackled soon.

That would be great indeed as it would clear things up from the admin's end.

Thanks again for having checked the code and for your report !

Cheers,

Isa

Hi french fellow ! :D

Thanks a lot for this workaround :) I will use it if I can't edit the H5P.image file with the Github fix that Oliver has pointed. Hopefully I will succeed !

Greetings,

Isa