Improve escaping in {lang} RegExp in WCF.Template
authorTim Düsterhus <duesterhus@woltlab.com>
Fri, 9 Jan 2015 18:06:14 +0000 (19:06 +0100)
committerTim Düsterhus <duesterhus@woltlab.com>
Fri, 9 Jan 2015 18:13:43 +0000 (19:13 +0100)
wcfsetup/install/files/js/WCF.js

index fdbda56b02e75b9f877de36a01fdda108d2ac801..276508f56c649872f4b3c9d9edd0f81d8bc2b5b0 100755 (executable)
@@ -4650,7 +4650,7 @@ WCF.Template = Class.extend({
                        return "' + " + content + " + '";
                })
                // {lang}foo{/lang}
-               .replace(/{lang}(.+?){\/lang}/g, function(_, content) {
+               .replace(/\{lang\}(.+?)\{\/lang\}/g, function(_, content) {
                        return "' + WCF.Language.get('" + unescape(content) + "') + '";
                })
                // {if}