[#6116] [desktop] escaping was moved to react-native-desktop side

This commit is contained in:
Roman Volosovskyi 2018-10-04 13:37:37 +03:00
parent 2a02f63567
commit 16fd0c272e
No known key found for this signature in database
GPG Key ID: 0238A4B5ECEE70DE
1 changed files with 1 additions and 7 deletions

View File

@ -93,17 +93,11 @@
(vec (map string/upper-case ts))
ts))
(defn escape-html [text]
(if (and platform/desktop? (string? text))
(clojure.string/escape text {\< "&lt;", \> "&gt;", \& "&amp;"})
text))
(defn text
([t]
[text-class (escape-html t)])
[text-class t])
([opts t & ts]
(->> (conj ts t)
(map escape-html)
(transform-to-uppercase opts)
(concat [text-class (add-font-style :style opts)])
(vec))))