瀏覽代碼

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…
取消
儲存