[CLJS-169] Forward slashes should not be escaped in javascript strings Created: 25/Mar/12 Updated: 30/Mar/12 Resolved: 30/Mar/12 |
|
| Status: | Resolved |
| 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: |
|
| 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 |