5

I'm trying to render HTML entities in Hoplon using the following:

(a :href "#" :class "deck-prev-link" :title "Previous" "←")

But instead of an arrow, it's displaying the literal ← in the rendered page.

What am I missing?

Charles
  • 50,943
  • 13
  • 104
  • 142
Micha Niskin
  • 197
  • 1
  • 10
  • Did you try to paste "←" itself in source code? – edbond Jan 20 '14 at 19:51
  • For ClojureScript uses, see also [ClojureScript and HTML entities](http://stackoverflow.com/questions/14408377/clojurescript-and-html-entities) which has [an answer which shows how to unescape HTML entities using the Google Closure library](http://stackoverflow.com/a/23353583/109618). – David J. Dec 09 '14 at 07:23

1 Answers1

6

So in case anyone is wondering, the answer is to either paste the "←" directly into the string like this:

(a :href "#" :class "deck-prev-link" :title "Previous" "←")

or to use the unicode escape in the string like this:

(a :href "#" :class "deck-prev-link" :title "Previous" "\u2190")

I found the unicode decimal code point for the leftward arrow here: List of XML and HTML Character Entity References.

Micha Niskin
  • 197
  • 1
  • 10