Skip to content

Commit

Permalink
CLJS-1576: fix source-map string encoding by applying encodeURICompon…
Browse files Browse the repository at this point in the history
…ent and fixing string/replace call
  • Loading branch information
Matthew Huebert authored and swannodette committed Oct 1, 2017
1 parent 300e326 commit 9778b34
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/cljs/cljs/js.cljs
Expand Up @@ -175,7 +175,10 @@
(.append sb
(str "\n//# sourceURL=" file
"\n//# sourceMappingURL=data:application/json;base64,"
(base64/encodeString (string/replace json #"%([0-9A-F]{2})" (.fromCharCode js/String "0x$1")))))))
(-> (js/encodeURIComponent json)
(string/replace #"%([0-9A-F]{2})" (fn [[_ match]]
(.fromCharCode js/String (str "0x" match))))
(base64/encodeString))))))

(defn- current-alias-map
[]
Expand Down

0 comments on commit 9778b34

Please sign in to comment.