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

unescaped html? #78

Open
chrisaustinGFK opened this issue Apr 4, 2023 · 1 comment
Open

unescaped html? #78

chrisaustinGFK opened this issue Apr 4, 2023 · 1 comment

Comments

@chrisaustinGFK
Copy link

Is there a way to include unescaped text in html?
For example,

await html`<div url=${'/path/to/thing?fred=1&ggg=abc'}>`

returns a url with an encoded &amp;:

<!DOCTYPE html><html><head></head><body><div url="/path/to/thing?fred=1&amp;ggg=abc"></div></body></html>'
@motss
Copy link
Owner

motss commented Jan 18, 2024

@chrisaustinGFK I think this is totally fine as it is totally valid to encode symbols in a URL.

When the browser parses the HTML, it will render it correctly (see below for the DOM content).

Screenshot 2024-01-18 at 15 25 11

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

No branches or pull requests

2 participants