|
|
@@ -244,7 +244,7 @@ var Mustache = function () { |
|
|
|
|
|
|
|
|
var new_regex = function () { |
|
|
var new_regex = function () { |
|
|
return that.getCachedRegex("render_tags", function (otag, ctag) { |
|
|
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 |
|
|
case ">": // render partial |
|
|
return that.render_partial(name, context, partials); |
|
|
return that.render_partial(name, context, partials); |
|
|
case "{": // the triple mustache is unescaped |
|
|
case "{": // the triple mustache is unescaped |
|
|
|
|
|
case "&": // & operator is an alternative unescape method |
|
|
return that.find(name, context); |
|
|
return that.find(name, context); |
|
|
default: // escape the value |
|
|
default: // escape the value |
|
|
return escapeHTML(that.find(name, context)); |
|
|
return escapeHTML(that.find(name, context)); |
|
|
|