mirror of
https://github.com/status-im/reagent.git
synced 2025-01-24 02:40:50 +00:00
Allow e.g dangerously-set-inner-HTML
This commit is contained in:
parent
bd1c04e0b3
commit
e76d81f16a
@ -15,6 +15,11 @@
|
||||
|
||||
(def dont-camel-case #{"aria" "data"})
|
||||
|
||||
(defn capitalize [s]
|
||||
(if (< (count s) 2)
|
||||
(string/upper-case s)
|
||||
(str (string/upper-case (subs s 0 1)) (subs s 1))))
|
||||
|
||||
(defn dash-to-camel [dashed]
|
||||
(if (string? dashed)
|
||||
dashed
|
||||
@ -22,7 +27,7 @@
|
||||
[start & parts] (string/split name-str #"-")]
|
||||
(if (dont-camel-case start)
|
||||
name-str
|
||||
(apply str start (map string/capitalize parts))))))
|
||||
(apply str start (map capitalize parts))))))
|
||||
|
||||
(def attr-aliases {:class "className"
|
||||
:for "htmlFor"
|
||||
|
Loading…
x
Reference in New Issue
Block a user