};
template = template.replace(/\{(\$[^\}]+?)\}/g, function(_, content) {
- content = unescape(content.replace(/\$([^.\[\s]+)/g, "(v['$1'])"));
+ content = unescape(content.replace(/\$([^.\[\(\)\]\s]+)/g, "(v['$1'])"));
return "' + WCF.String.escapeHTML(" + content + ") + '";
})
// Numeric Variable
.replace(/\{#(\$[^\}]+?)\}/g, function(_, content) {
- content = unescape(content.replace(/\$([^.\[\s]+)/g, "(v['$1'])"));
+ content = unescape(content.replace(/\$([^.\[\(\)\]\s]+)/g, "(v['$1'])"));
return "' + WCF.String.formatNumeric(" + content + ") + '";
})
// Variable without escaping
.replace(/\{@(\$[^\}]+?)\}/g, function(_, content) {
- content = unescape(content.replace(/\$([^.\[\s]+)/g, "(v['$1'])"));
+ content = unescape(content.replace(/\$([^.\[\(\)\]\s]+)/g, "(v['$1'])"));
return "' + " + content + " + '";
})
})
// {if}
.replace(/\{if (.+?)\}/g, function(_, content) {
- content = unescape(content.replace(/\$([^.\[\s]+)/g, "(v['$1'])"));
+ content = unescape(content.replace(/\$([^.\[\(\)\]\s]+)/g, "(v['$1'])"));
return "';\n" +
"if (" + content + ") {\n" +
})
// {elseif}
.replace(/\{else ?if (.+?)\}/g, function(_, content) {
- content = unescape(content.replace(/\$([^.\[\s]+)/g, "(v['$1'])"));
+ content = unescape(content.replace(/\$([^.\[\(\)\]\s]+)/g, "(v['$1'])"));
return "';\n" +
"}\n" +
if (typeof $parameters['item'] === 'undefined') throw new Error('Missing item attribute in implode-tag');
if (typeof $parameters['glue'] === 'undefined') $parameters['glue'] = "', '";
- $parameters['from'] = $parameters['from'].replace(/\$([^.\[\s]+)/g, "(v.$1)");
+ $parameters['from'] = $parameters['from'].replace(/\$([^.\[\(\)\]\s]+)/g, "(v.$1)");
return "';\n"+
"var $implode_" + $tagID + " = false;\n" +
if (typeof $parameters['from'] === 'undefined') throw new Error('Missing from attribute in foreach-tag');
if (typeof $parameters['item'] === 'undefined') throw new Error('Missing item attribute in foreach-tag');
- $parameters['from'] = $parameters['from'].replace(/\$([^.\[\s]+)/g, "(v.$1)");
+ $parameters['from'] = $parameters['from'].replace(/\$([^.\[\(\)\]\s]+)/g, "(v.$1)");
return "';\n" +
"$foreach_"+$tagID+" = false;\n" +