diff --git a/components/src/status_im/ui/components/react.cljs b/components/src/status_im/ui/components/react.cljs index 1f0a179535..e7445c6fbc 100644 --- a/components/src/status_im/ui/components/react.cljs +++ b/components/src/status_im/ui/components/react.cljs @@ -92,11 +92,17 @@ (vec (map string/upper-case ts)) ts)) +(defn escape-html [text] + (if (and platform/desktop? (string? text)) + (clojure.string/escape text {\< "<", \> ">", \& "&"}) + text)) + (defn text ([t] - [text-class t]) + [text-class (escape-html t)]) ([opts t & ts] (->> (conj ts t) + (map escape-html) (transform-to-uppercase opts) (concat [text-class (add-font-style :style opts)]) (vec))))