Просмотр исходного кода

Fix quote implementation for environments without JSON.stringify

tags/0.5.2
Michael Jackson 14 лет назад
Родитель
Сommit
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) {


Загрузка…
Отмена
Сохранить