[Pkg-javascript-commits] [sockjs-client] 213/434: Escaping new lines is not exactly a good idea.

Tonnerre Lombard tonnerre-guest at moszumanska.debian.org
Wed Jan 8 00:47:14 UTC 2014


This is an automated email from the git hooks/post-receive script.

tonnerre-guest pushed a commit to branch master
in repository sockjs-client.

commit 1feb09df003c229d6f1d26b97e6c95285e674f63
Author: Marek Majkowski <majek04 at gmail.com>
Date:   Fri Nov 25 16:48:25 2011 +0000

    Escaping new lines is not exactly a good idea.
    
    BTW, \r _will be escaped_ !
---
 bin/render.coffee | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bin/render.coffee b/bin/render.coffee
index 4f5ac7c..f18307b 100644
--- a/bin/render.coffee
+++ b/bin/render.coffee
@@ -26,7 +26,7 @@ array_flatten = (arr, acc) ->
 stringify_unicode = (str) ->
     str = str.replace /[\u0100-\uffff]/g, (ch) ->
             return "\\u" + ('0000' + ch.charCodeAt(0).toString(16)).substr(-4)
-    str = str.replace /[\x00-\x1f\x7f-\xff]/g, (ch) ->
+    str = str.replace /[\x00-\x08\x0b-\x1f\x7f-\xff]/g, (ch) ->
             return "\\x" + ('00' + ch.charCodeAt(0).toString(16)).substr(-2)
     return str
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/sockjs-client.git



More information about the Pkg-javascript-commits mailing list