<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -23,14 +23,23 @@
    (string-join (hash-map scheme-hash (lambda (k v) (format &quot;~A:~A&quot; (js-quote k) v)))
                 &quot;, &quot;)
    &quot;}&quot;))
-
+  
 (define (js-quote thing)
   (cond ((number? thing) (number-&gt;string thing))
-        ((or (string? thing) (symbol? thing)) (format &quot;'~A'&quot; thing))
+        ((or (string? thing) (symbol? thing))
+         (format &quot;\&quot;~A\&quot;&quot; (careful-string-quote (if (string? thing)
+                                                    thing
+                                                    (symbol-&gt;string thing)))))
         ((eq? thing #t) &quot;true&quot;)
         ((eq? thing #f) &quot;false&quot;)
         (else (e &quot;Don't know how to js-quote ~A.&quot; thing))))
 
+(define (careful-string-quote scm-str)
+  (pregexp-replace-many scm-str
+                        (&quot;\n&quot; =&gt; &quot;  &quot;)
+                        (&quot;\r&quot; =&gt; &quot;  &quot;)
+                        (&quot;\&quot;&quot; =&gt; &quot;'&quot;)))
+
 (define (js-call-on-load fn-name #:quote-all (quote-all #f) . args)
   (format &quot;$(document).ready(function() { ~A })&quot;
           (apply js-call fn-name #:quote-all quote-all args)))</diff>
      <filename>js.scm</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>9ccdcd64d075edcbf1354f448fc535c002c4918c</id>
    </parent>
  </parents>
  <author>
    <name>Rob Hunter</name>
    <email>rob.hunter@gmail.com</email>
  </author>
  <url>http://github.com/vegashacker/leftparen/commit/8ab1648f91f77aa2b28489411fc05a2210005bc9</url>
  <id>8ab1648f91f77aa2b28489411fc05a2210005bc9</id>
  <committed-date>2008-11-25T12:28:30-08:00</committed-date>
  <authored-date>2008-11-25T12:28:30-08:00</authored-date>
  <message>safer quoting</message>
  <tree>b4b310828c249df317da2585652fff1801f471a0</tree>
  <committer>
    <name>Rob Hunter</name>
    <email>rob.hunter@gmail.com</email>
  </committer>
</commit>
