Symbols for attribute values?
Would you be interested in a pull request that got this to work:
[:form {:method 'post} ...
Like the following already works:
[:div {:style {:box-sizing 'border-box ...
I just noticed that [:input {:type 'password ... also seems to work. So it appears be inconsistent. ?
user=> (use 'hiccup2.core)
nil
user=> (str (html [:form {:method 'post}]))
"<form method=\"post\"></form>"
Can you provide an example where quoted symbols don't work?
It appears to be triggered by having a variable within the HTML data:
user=> (let [x "foo"] (hic/html [:form {:method 'post} x]))
"<form method=\"quote post\">foo</form>"
Thanks, I can reproduce that on master. That is a bug, and I would be interested in a PR to fix it.
Okay, I don't have a PR at the moment. Looking at the code I can see sort of where the problem is (compile-attr-map, unevaluated?) but I don't understand it enough to fix it.