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

do not encode entities in attribute values #150

Merged
merged 2 commits into from
Oct 9, 2020

Conversation

ehrencrona
Copy link
Contributor

Fixes #29 (comment) :

<i data-icon="&#xE04E;">icon</i> was turned into <i data-icon="">icon</i>

I introduced a new function to explain what node.raw || node.data was doing; I hadn't understood it.

} else {
return node.data;
return getUnencodedText(node);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the actual bug

@@ -76,7 +76,7 @@ export const inlineElements: TagName[] = [
/**
* HTML attributes that we may safely reformat (trim whitespace, add or remove newlines)
*/
export const formattableAttributes = [
export const formattableAttributes: string[] = [
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is unrelated but fixes warning

@dummdidumm dummdidumm merged commit 869e35e into sveltejs:master Oct 9, 2020
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.

HTML entities not preserved
2 participants