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

Prevent including HTML entities in web app manifest name and description fields #226

Merged

Conversation

westonruter
Copy link
Collaborator

I tried setting the blogname to:

WordPress & "Develop" and 'food' and “drink” 😀

And the manifest then erroneously included:

{"name":"WordPress & "Develop" and 'food' and \u201cdrink\u201d \ud83d\ude00")

There are named entities which need to be decoded, which wp_kses_decode_entities() doesn't do. So we need to use html_entity_decode() instead.

After the changes here, the manifest then includes:

{"name":"WordPress & \"Develop\" and 'food' and \u201cdrink\u201d \ud83d\ude00"}

@westonruter westonruter added the bug Something isn't working label Nov 6, 2019
@westonruter westonruter added this to the 0.4 milestone Nov 6, 2019
@westonruter westonruter merged commit ed3883a into master Nov 11, 2019
@westonruter westonruter deleted the fix/html-entities-in-manifest-name-and-description branch November 11, 2019 04:45
@westonruter westonruter added the web-app-manifest Web App Manifests label Mar 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working web-app-manifest Web App Manifests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant