[tor-commits] [flashproxy/master] Use global regexp when quoting quotes in repr.

dcf at torproject.org dcf at torproject.org
Fri Apr 5 15:38:24 UTC 2013


commit d969b8d7a9b83943476eca93b9a5146444157203
Author: David Fifield <david at bamsoftware.com>
Date:   Fri Apr 5 08:37:19 2013 -0700

    Use global regexp when quoting quotes in repr.
---
 proxy/flashproxy.js |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/proxy/flashproxy.js b/proxy/flashproxy.js
index 441b511..56c1f0e 100644
--- a/proxy/flashproxy.js
+++ b/proxy/flashproxy.js
@@ -902,7 +902,7 @@ function Badge() {
 }
 
 function quote(s) {
-    return "\"" + s.replace(/([\\\"])/, "\\$1") + "\"";
+    return "\"" + s.replace(/([\\\"])/g, "\\$1") + "\"";
 }
 
 function maybe_quote(s) {



More information about the tor-commits mailing list