block links

29 views
Skip to first unread message

xavi

unread,
Apr 9, 2013, 6:27:55 PM4/9/13
to enliv...@googlegroups.com
Hello,

I have some HTML with a block link, i.e. an HTML block-level element (in this case an H1) wrapped inside a link tag (apparently this is a new feature of HTML 5, http://html5doctor.com/block-level-links-in-html-5/ ). The problem is that Enlive doesn't parse the code correctly and breaks the page. For example,

(require '[net.cgrand.enlive-html :as h])
(h/html-snippet "<a href=\"/\"><h1>block link</h1></a>")
; => ({:tag :a, :attrs {:href "/"}, :content nil} {:tag :h1, :attrs nil, :content ("block link")})

Is there a way to avoid this?

Cheers,

xavi



Christophe Grand

unread,
Apr 10, 2013, 6:44:31 AM4/10/13
to enlive-clj
I should cut a 1.1.2 version so that you can switch to jsoup (instead of tagsoup) which should parse this code correctly.





--
You received this message because you are subscribed to the Google Groups "Enlive" group.
To unsubscribe from this group and stop receiving emails from it, send an email to enlive-clj+...@googlegroups.com.
To post to this group, send email to enliv...@googlegroups.com.
Visit this group at http://groups.google.com/group/enlive-clj?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
On Clojure http://clj-me.cgrand.net/
Clojure Programming http://clojurebook.com
Training, Consulting & Contracting http://lambdanext.eu/
Reply all
Reply to author
Forward
0 new messages