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

Fix: Song titles with HTML entities do not render correctly #119 #120

Closed
wants to merge 1 commit into from

Conversation

mouselangelo
Copy link

Fixes #119

HTML entities such as quotation marks (&quote;) and apostrophe (&#39) do not render correctly:

Example:

No More "I Love You's" by Annie Lennox

renders as:

No More &quote;I Love You&#39s&quote; by Annie Lennox

Before:
before

Fixed:
after

Reference: i18next/react-i18next#1205 (comment)

@mouselangelo
Copy link
Author

@JMPerez - please approve if these changes make sense to you. 🙏

@JMPerez
Copy link
Owner

JMPerez commented Mar 7, 2021

@mouselangelo Looks like transSupportBasicHtmlNodes doesn't fix it, and it's thanks to the interpolation > escapeValue that gets fixed. However, this leads to potential XSS attacks so I think it should be limited to that specific string instead of setting it globally.

Let me know if you can amend the change, otherwise I can do it.

@mouselangelo
Copy link
Author

@JMPerez makes sense. Feel free to make the changes and merge. Thanks! 🙏

@mouselangelo Looks like transSupportBasicHtmlNodes doesn't fix it, and it's thanks to the interpolation > escapeValue that gets fixed. However, this leads to potential XSS attacks so I think it should be limited to that specific string instead of setting it globally.

Let me know if you can amend the change, otherwise I can do it.

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

Successfully merging this pull request may close these issues.

Song titles with HTML entities do not render correctly
2 participants