fix: notify users to switch to the new filename format

Notify users to switch to the new filename format if there're reserved
chars when syncing.

Also, this commit replace all `js/decodeURIComponent` with
`safe-decode-uri-component` to avoid UI crashes.
This commit is contained in:
Tienson Qin
2022-11-06 21:17:29 +08:00
parent a8eb7810a9
commit dd0169b068
15 changed files with 84 additions and 28 deletions

View File

@@ -69,7 +69,7 @@
(defn- get-whiteboard-tldr-from-text
[text]
(when-let [matched-text (util/safe-re-find #"<whiteboard-tldr>(.*)</whiteboard-tldr>" text)]
(try-parse-as-json (js/decodeURIComponent (second matched-text)))))
(try-parse-as-json (gp-util/safe-decode-uri-component (second matched-text)))))
(defn- get-whiteboard-shape-refs-text
[text]