humhub / linkpreview-issues

Issue Tracker for LinkPreview module
2 stars 1 forks source link

issue with encoding #18

Closed Reuns closed 3 years ago

Reuns commented 3 years ago

As a french user, there are a lot of links to french websites.

Preview appears like this (minus the space ... otherwise github translate the accent correctly)

Un hommage au pilote l&eacute ;gendaire Ayrton Senna

instead of

Un hommage au pilote légendaire Ayrton Senna

All accent and special chars are incorrect.

I guess it's a UTF-8 encoding issue...

luke- commented 3 years ago

Can you please provide some example URLs and Screenshots?

Reuns commented 3 years ago

You can try to add this url : https://store.playstation.com/fr-fr/product/EP0001-PPSA01870_00-FC6EDSTANDARD000/ And look at this mess ^^ image

Youtube Videos have the same issue : https://www.youtube.com/watch?v=qc3HBnPanx0 image

Hope it'll help...

yurabakhtin commented 3 years ago

@luke- Fixed in PR https://github.com/humhub/linkpreview/pull/7:

fr

We already fixed similar issue here https://github.com/humhub/linkpreview-issues/issues/16, there https://github.com/humhub/linkpreview/pull/4/files#diff-b1d65a17c66062f6504e240ef9ec053b8ed6dad76fc3b78390246efa7f546aadR89 I added htmlentities() and it worked well for these cases, but on current it didn't work, so I changed to html_entity_decode() because the current fr case has a &amp; in the <title>FAR CRY®6 - Édition standard PS4 &amp; PS5</title>.

Previous cz samples work well with new PR too:

cz
luke- commented 3 years ago

@yurabakhtin Thanks!

luke- commented 3 years ago

@Reuns Version 1.15.6 should fixes the problem

Reuns commented 3 years ago

That's perfect ! Thank you.

Reuns commented 2 years ago

Hi ! Issue is still here for youtube video Example with : https://www.youtube.com/watch?v=qc3HBnPanx0 image