ClojureScript and HTML Objects

I'm having trouble getting indispensable HTML space through ClojureScript.

If I use "& nbsp;" the string is just printed literally.

I am using the Crate library.

+8
html clojurescript
source share
2 answers

Got this after reading:

https://github.com/ibdknox/crate/issues/12

The main problem is that Crate inserts directly into the DOM, thereby skipping the entity extension (please someone correct me if I misunderstood).

One solution is to use the following line, which represents the UTF for  : \u00A0 .

+6
source share

Google's closure library, using clojurescript, includes line helpers that let you extend HTML objects.

 (require '[goog.string :as gstring]) (gstring/unescapeEntities " ") 
+14
source share

All Articles