-
Notifications
You must be signed in to change notification settings - Fork 149
Open
Description
Hi,
I'm loving enlive, however I have a weird problem with finding and replacing variables inside meta tags.
This is my html.
<meta property="og:title" content="${event-title}" />
When I apply this transformation:
(at (html-resource "templates/page-meta.html") [:meta] (replace-vars {:event-title "hello"}))
assuming the HTML content is in the file templates/page-meta.html I get this problem:
1. Unhandled java.lang.NullPointerException
(No message)
Matcher.java: 701 java.util.regex.Matcher/quoteReplacement
string.clj: 67 clojure.string/replace-by
string.clj: 106 clojure.string/replace
enlive_html.clj: 677 net.cgrand.enlive-html/replace-vars/substitute-vars
enlive_html.clj: 683 net.cgrand.enlive-html/replace-vars/fn/iter/fn
LazySeq.java: 40 clojure.lang.LazySeq/sval
LazySeq.java: 49 clojure.lang.LazySeq/seq
Without going through the enlive sources, which I don't really have time for, I'm at a loss to explain this problem?
Any ideas?
Cheers, Jason.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels