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

Reagent renders Hickory generated Hiccup with &escapes; litterally #413

Closed
ghost opened this issue Dec 4, 2018 · 1 comment
Closed

Reagent renders Hickory generated Hiccup with &escapes; litterally #413

ghost opened this issue Dec 4, 2018 · 1 comment

Comments

@ghost
Copy link

ghost commented Dec 4, 2018

Hickory claims to generate valid Hiccup (see e.g. clj-commons/hickory#25), but Reagent appears to render that wrongly: If it contains &escapes;, e.g. ' for ', the escaped token will be rendered literally on the page. If React force-escapes input strings and the workarounds are troublesome, which I gather from #14 and #104, is it possible to make Reagent unescape strings before passing them on?

@Deraen
Copy link
Member

Deraen commented Dec 5, 2018

As mentioned in 104, you can call gstring/unescapeEntities to convert HTML char entities to Unicode characters. But the call is not very performant if I recall correctly, so Reagent can't automatically call it.

Reagent probably isn't fully Hiccup compatible anyway, just "Hiccup-style".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant