Sfoglia il codice sorgente

slash (\) should not be escaped in html

tags/0.4.0
Martin Murphy 14 anni fa
parent
commit
c4687d856c
1 ha cambiato i file con 1 aggiunte e 2 eliminazioni
  1. +1
    -2
      mustache.js

+ 1
- 2
mustache.js Vedi File

@@ -246,8 +246,7 @@ var Mustache = function() {
s = String(s === null ? "" : s); s = String(s === null ? "" : s);
return s.replace(/&(?!\w+;)|["'<>\\]/g, function(s) { return s.replace(/&(?!\w+;)|["'<>\\]/g, function(s) {
switch(s) { switch(s) {
case "&": return "&amp;";
case "\\": return "\\\\";
case "&": return "&amp;";
case '"': return '&quot;'; case '"': return '&quot;';
case "'": return '&#39;'; case "'": return '&#39;';
case "<": return "&lt;"; case "<": return "&lt;";


Loading…
Annulla
Salva