[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [flashproxy/js] maybe_quote needs to quote anything that's not an identifier.



commit 021b7e0e23ae3621d22bad82a8ace5ce49d9a300
Author: David Fifield <david@xxxxxxxxxxxxxxx>
Date:   Mon Mar 12 22:24:21 2012 -0700

    maybe_quote needs to quote anything that's not an identifier.
---
 flashproxy-test.js |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/flashproxy-test.js b/flashproxy-test.js
index e90d4b1..e4a59b9 100755
--- a/flashproxy-test.js
+++ b/flashproxy-test.js
@@ -34,7 +34,7 @@ function quote(s)
 
 function maybe_quote(s)
 {
-    if (/[\\\"]/.test(s))
+    if (!/^[a-zA-Z_]\w*$/.test(s))
         return quote(s);
     else
         return s;



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits