Skip to content

Commit

Permalink
Fix an unclosed HTML entity when escape single quote
Browse files Browse the repository at this point in the history
  • Loading branch information
Wu Zhe committed Jul 8, 2011
1 parent 6d07d2f commit 8ffdd09
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backbone.js
Expand Up @@ -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, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#x27').replace(/\//g,'&#x2F;');
return string.replace(/&(?!\w+;|#\d+;|#x[\da-f]+;)/gi, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#x27;').replace(/\//g,'&#x2F;');
};

}).call(this);

0 comments on commit 8ffdd09

Please sign in to comment.