Procházet zdrojové kódy

83: Add support for & operator for unescaping

Conflicts:

	mustache.js
tags/0.4.0
Don Brown Michael Jackson před 15 roky
rodič
revize
634b29d275
1 změnil soubory, kde provedl 2 přidání a 1 odebrání
  1. +2
    -1
      mustache.js

+ 2
- 1
mustache.js Zobrazit soubor

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


Načítá se…
Zrušit
Uložit