weavejester / hiccup

Fast library for rendering HTML in Clojure
http://weavejester.github.io/hiccup
Eclipse Public License 1.0
2.68k stars 174 forks source link

Output is incorrect if attribute contains colon #138

Closed Jarzka closed 2 years ago

Jarzka commented 7 years ago

I have the following hiccup form [:use {:xlink:href (str "#" name)}]

This incorrectly outputs as an empty use tag without any attributes.

It seems that if :xlink:href is replaced with :href it works, however Firefox and iPad require to use the correct attribute xlink:href

Jarzka commented 7 years ago

Nevermind, :xlinkHref works.

zerg000000 commented 7 years ago

I have tried test case like below, it passes

(is (= (str (html [:xml {:a:b "1", :b "2"}])) "<xml a:b=\"1\" b=\"2\"></xml>"))

how to reproduce your case?