I'm having trouble getting a non-breaking space into HTML via ClojureScript.
If I use " " the string is simply printed literally.
I'm using the Crate library.
Google's closure library that clojurescript leverages includes string helpers that will allow you to expand HTML entities.
(require '[goog.string :as gstring])
(gstring/unescapeEntities " ")
Got it after reading:
https://github.com/ibdknox/crate/issues/12
Basically, the issue seems to be that Crate inserts directly into the DOM thus skipping entity expansion (please someone correct me if I've misunderstood).
One solution is to use the following string which represents the UTF for  :
\u00A0
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With