[Pkg-javascript-commits] [backbone] 03/21: Fix an unclosed HTML entity when escape single quote

Jonas Smedegaard js at moszumanska.debian.org
Sat May 3 17:01:04 UTC 2014


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

js pushed a commit to tag 0.5.2
in repository backbone.

commit 8ffdd09b52394786da0ee0a2a20ac54667c90597
Author: Wu Zhe <zhe.wu at onycloud.com>
Date:   Fri Jul 8 14:20:39 2011 +0800

    Fix an unclosed HTML entity when escape single quote
---
 backbone.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/backbone.js b/backbone.js
index 5455ebc..0dbc34b 100644
--- a/backbone.js
+++ b/backbone.js
@@ -1143,7 +1143,7 @@
 
   // Helper function to escape a string for HTML rendering.
   var escapeHTML = function(string) {
-    return string.replace(/&(?!\w+;|#\d+;|#x[\da-f]+;)/gi, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"').replace(/'/g, '&#x27').replace(/\//g,'&#x2F;');
+    return string.replace(/&(?!\w+;|#\d+;|#x[\da-f]+;)/gi, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"').replace(/'/g, '&#x27;').replace(/\//g,'&#x2F;');
   };
 
 }).call(this);

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



More information about the Pkg-javascript-commits mailing list