From: Tim Düsterhus Date: Fri, 9 Jan 2015 18:06:14 +0000 (+0100) Subject: Improve escaping in {lang} RegExp in WCF.Template X-Git-Tag: 2.1.0_Beta_3~4 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=084c1d0d5e6c8ec19ee92d424ac2f014638b8025;p=GitHub%2FWoltLab%2FWCF.git Improve escaping in {lang} RegExp in WCF.Template --- diff --git a/wcfsetup/install/files/js/WCF.js b/wcfsetup/install/files/js/WCF.js index fdbda56b02..276508f56c 100755 --- a/wcfsetup/install/files/js/WCF.js +++ b/wcfsetup/install/files/js/WCF.js @@ -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}