Преглед изворни кода

Fix quote implementation for environments without JSON.stringify

tags/0.5.2
Michael Jackson пре 14 година
родитељ
комит
e53ce34af4
1 измењених фајлова са 1 додато и 1 уклоњено
  1. +1
    -1
      mustache.js

+ 1
- 1
mustache.js Прегледај датотеку

@@ -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) {


Loading…
Откажи
Сачувај