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 literal child elements being escaped #207

Merged
merged 1 commit into from
Jan 4, 2024

Conversation

luontola
Copy link
Contributor

@luontola luontola commented Dec 8, 2023

Fixes (html [(identity :p) [:span "x"]]) producing "<p>&lt;span&gt;x&lt;/span&gt;</p>" instead of "<p><span>x</span></p>"

I also noticed that element-compile-strategy returned ::default, but compile-element used :default (the default dispatching value for multimethods). Now they both use the same dispatching value.

@luontola
Copy link
Contributor Author

@weavejester Do you have time to look through this and my other PR?

@weavejester
Copy link
Owner

Apologies for the delay; I've been traveling. This PR looks good. I split out the :default -> ::default change into its own small commit, just to keep this one clean. Can you rebase and change the commit message to:

Fix literal child elements being escaped

Fix a form like:
    (html [(identity :p) [:span "x"]])

Evaluating to:
    "<p>&lt;span&gt;x&lt;/span&gt;</p>"

Instead of:
    "<p><span>x</span></p>"

The commit messages use plaintext rather than markdown, so this makes it a little easier to read.

Fix a form like:
    (html [(identity :p) [:span "x"]])

Evaluating to:
    "<p>&lt;span&gt;x&lt;/span&gt;</p>"

Instead of:
    "<p><span>x</span></p>"
@luontola
Copy link
Contributor Author

Changes done.

@luontola
Copy link
Contributor Author

@weavejester ping

@weavejester
Copy link
Owner

This all looks good. Again, apologies for the delay - I only got back home yesterday so my time for open source work over the holidays has been limited.

@weavejester weavejester merged commit 4d7303c into weavejester:master Jan 4, 2024
1 check passed
@luontola luontola deleted the fix-accidental-escaping branch January 5, 2024 17:06
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.

2 participants