Przeglądaj źródła

Fix quote implementation for environments without JSON.stringify

tags/0.5.2
Michael Jackson 14 lat temu
rodzic
commit
e53ce34af4
1 zmienionych plików z 1 dodań i 1 usunięć
  1. +1
    -1
      mustache.js

+ 1
- 1
mustache.js Wyświetl plik

@@ -47,7 +47,7 @@ var Mustache = (typeof module !== "undefined" && module.exports) || {};
};

var quote = (typeof JSON !== "undefined" && JSON.stringify) || function (string) {
return '"' + String(string).replace(/(^|[^\\])"/g, '\\"') + '"';
return '"' + String(string).replace(/([\\"])/g, '\\$1') + '"';
};

function escapeRe(string) {


Ładowanie…
Anuluj
Zapisz