<< Back to previous view

[CLJS-169] Forward slashes should not be escaped in javascript strings Created: 25/Mar/12  Updated: 27/Jul/13  Resolved: 30/Mar/12

Status: Closed
Project: ClojureScript
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Defect Priority: Minor
Reporter: Brandon Bloom Assignee: Unassigned
Resolution: Completed Votes: 0
Labels: patch,

Attachments: File no-escape-slash.diff    
Patch: Code

 Description   

cljs.compiler/escape-char incorrectly escapes forward slashes.

Generally, this isn't a problem because most Javascript engines treat unknown escape sequences as non-escape sequences. However, I ran into a JSON parser that barfs on it while working on source-maps. I tried to use escape-string for producing the JSON-based source-map by reusing the existing compiler functions for emitting valid Javascript.



 Comments   
Comment by David Nolen [ 30/Mar/12 3:21 PM ]

fixed, https://github.com/clojure/clojurescript/commit/29d60c7eb2c79768e2e2a2c572a4e4eff132946d

Generated at Thu Apr 24 18:24:07 CDT 2014 using JIRA 4.4#649-r158309.