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

HTML entities not preserved #29

Closed
RedHatter opened this issue May 23, 2019 · 4 comments · Fixed by #39 or #150
Closed

HTML entities not preserved #29

RedHatter opened this issue May 23, 2019 · 4 comments · Fixed by #39 or #150
Labels
bug Something isn't working

Comments

@RedHatter
Copy link

HTML entities in templates are replaced with their literal equivalents. For example

5 < 6

is transformed into

5 < 6

This can cause encoding issues with unicode entities and compile errors with < and >.

@jamesbirtles
Copy link
Contributor

This is a limitation with the svelte parser atm. See sveltejs/svelte#2714

@jamesbirtles jamesbirtles added the bug Something isn't working label May 23, 2019
RedHatter pushed a commit to RedHatter/prettier-plugin-svelte that referenced this issue May 25, 2019
@RedHatter RedHatter mentioned this issue May 25, 2019
RedHatter pushed a commit to RedHatter/prettier-plugin-svelte that referenced this issue May 26, 2019
RedHatter pushed a commit to RedHatter/prettier-plugin-svelte that referenced this issue May 26, 2019
@mdorda
Copy link

mdorda commented Oct 7, 2020

It seems this issue is back since version 1.2.0 :-/

@mdorda
Copy link

mdorda commented Oct 7, 2020

@Conduitry Could you please open this issue again? For example:

<i data-icon="&#xE04E;">icon</i>

is formatted into:

<i data-icon="">icon</i>

@ehrencrona
Copy link
Contributor

@mdorda Thanks for the bug report! For next time: a new issue would have been better. The bug described in the description of this issue has been fixed; it's only in attribute values where it doesn't work. In any case, I found and fixed the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
4 participants