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

83: Add support for & operator for unescaping

Conflicts:

	mustache.js
tags/0.4.0
Don Brown Michael Jackson пре 15 година
родитељ
комит
634b29d275
1 измењених фајлова са 2 додато и 1 уклоњено
  1. +2
    -1
      mustache.js

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

@@ -244,7 +244,7 @@ var Mustache = function () {

var new_regex = function () {
return that.getCachedRegex("render_tags", function (otag, ctag) {
return new RegExp(otag + "(=|!|>|\\{|%)?([^#\\^]+?)\\1?" + ctag + "+", "g");
return new RegExp(otag + "(=|!|>|&|\\{|%)?([^#\\^]+?)\\1?" + ctag + "+", "g");
});
};

@@ -260,6 +260,7 @@ var Mustache = function () {
case ">": // render partial
return that.render_partial(name, context, partials);
case "{": // the triple mustache is unescaped
case "&": // & operator is an alternative unescape method
return that.find(name, context);
default: // escape the value
return escapeHTML(that.find(name, context));


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