signalapp / Signal-Desktop

A private messenger for Windows, macOS, and Linux.
https://signal.org/download
GNU Affero General Public License v3.0
14.16k stars 2.57k forks source link

HTML entities are not being decoded in link previews when shown to sender #6918

Closed brad2014 closed 1 day ago

brad2014 commented 1 week ago

Using a supported version?

Overall summary

Link previews containing HTML entities such as ‘ are not being decoded in the preview description.

Seems like it could be related to (or a possible regression of) #5397, closed in 2021.

Steps to reproduce

In a chat, paste the URL https://www.catalannews.com/culture/item/sant-joan-the-catalan-fire-festival-ignites-on-the-23rd-of-june and notice that the preview looks like the screenshot below:

Expected result

The HTML entities in the description should be decoded, so as to appear thus:

Sant Joan, or ‘nit de foc’ (‘night of fire’ in Catalan) will ignite

Actual result

The description of the preview contains:

Sant Joan, or ‘nit de foc’ (‘night of fire’ in Catalan) will ignite

Screenshots

Screenshot 2024-06-20 at 11 54 35

Signal version

7.12.0 (Apple Silicon)

Operating system

MacOS 14.5 (Sonoma)

Version of Signal on your phone

7.9.5

Link to debug log

No response

brad2014 commented 1 week ago

May be related to Issue #6193, which refers to received notifications (as opposed to link previews at the sender).

May be related to Issue #5397, which was closed in 2021.

indutny-signal commented 1 day ago

I just went and checked the source for that page and it looks like the website description is incorrectly double-escaped:

Sant Joan, or ‘nit de foc’ (‘night of fire’ in Catalan)

Sorry, but this appears to be an issue on that website's end!