This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-09-05
Channels
- # announcements (2)
- # babashka (19)
- # beginners (14)
- # biff (10)
- # calva (23)
- # clojure (49)
- # clojure-europe (15)
- # clojure-nl (3)
- # clojure-norway (25)
- # clojure-seattle (1)
- # clojure-uk (4)
- # clojurescript (7)
- # data-science (6)
- # datahike (3)
- # datomic (1)
- # emacs (13)
- # events (2)
- # fulcro (3)
- # graalvm (13)
- # hyperfiddle (32)
- # leiningen (4)
- # lsp (38)
- # malli (1)
- # missionary (34)
- # nbb (28)
- # off-topic (42)
- # other-languages (5)
- # portal (8)
- # practicalli (1)
- # re-frame (3)
- # releases (1)
- # ring (7)
- # shadow-cljs (13)
- # sql (3)
Hi, I have a bit of a simple question. I'm using lilactown/helix to write a blog site, I'd like to put in a html character → but I only get it as raw text not a rendered figure. I've tried unicode points as well to no effect.
Here's the component.
($ link/link
{:href href
:class-name "text-base font-medium leading-6 text-primary-500 hover:text-primary-600 dark:hover:text-primarf-400"
:aria-label (str "Link to " title)}
"Learn more →")
Any ideas on how to render the figure, or escape the text? Not too sure what the approach here is.
Just in case - if it's a more or less static blog then Helix (as well as the underlying React) is likely an overkill and something like a static website generator would be a better fit.
As for your actual question - nowadays it isn't that much of a problem to just include the symbol in your sources directly: "Learn more →"
.
Oh it's definitely overkill, but it makes me happy ^^ As for the arrow. Putting it in directly worked beautifully thanks a bunch.
The key thing is that evidently your tool "escapes" the string content, thereby making an equivalent presentation once the browser interprets the HTML. This is considered a Very Good Thing because it inhibits injection attacks. As a result, your responsibility (as the programmer) is to provide an accurate Clojure string, NOT HTML. Therefore pasting the arrow, literally, works. You also have another option: If you want a 7-bit-clean source code, you can use the usual \uXXXX kind of notation (for Clojure strings) to insert the arrow.