[#6116] [desktop] escaping was moved to react-native-desktop side
This commit is contained in:
parent
2a02f63567
commit
16fd0c272e
|
@ -93,17 +93,11 @@
|
||||||
(vec (map string/upper-case ts))
|
(vec (map string/upper-case ts))
|
||||||
ts))
|
ts))
|
||||||
|
|
||||||
(defn escape-html [text]
|
|
||||||
(if (and platform/desktop? (string? text))
|
|
||||||
(clojure.string/escape text {\< "<", \> ">", \& "&"})
|
|
||||||
text))
|
|
||||||
|
|
||||||
(defn text
|
(defn text
|
||||||
([t]
|
([t]
|
||||||
[text-class (escape-html t)])
|
[text-class t])
|
||||||
([opts t & ts]
|
([opts t & ts]
|
||||||
(->> (conj ts t)
|
(->> (conj ts t)
|
||||||
(map escape-html)
|
|
||||||
(transform-to-uppercase opts)
|
(transform-to-uppercase opts)
|
||||||
(concat [text-class (add-font-style :style opts)])
|
(concat [text-class (add-font-style :style opts)])
|
||||||
(vec))))
|
(vec))))
|
||||||
|
|
Loading…
Reference in New Issue