From ed5f5cbd3fd046920f927eba6a13d35541f5dc75 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Tue, 18 Apr 2023 09:42:25 +0200 Subject: [PATCH] Fix `StringUtil.unescapeHTML()` The HTML was unescaped in an incorrect order, causing incorrect results for inputs like: StringUtil.unescapeHTML('&quot;') --- wcfsetup/install/files/js/WoltLabSuite/Core/StringUtil.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/StringUtil.js b/wcfsetup/install/files/js/WoltLabSuite/Core/StringUtil.js index 094aca18e7..37f4754e71 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/StringUtil.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/StringUtil.js @@ -98,7 +98,7 @@ define(['Language', './NumberUtil'], function(Language, NumberUtil) { * @return {String} */ unescapeHTML: function(string) { - return String(string).replace(/&/g, '&').replace(/"/g, '"').replace(/</g, '<').replace(/>/g, '>'); + return String(string).replace(/"/g, '"').replace(/</g, '<').replace(/>/g, '>').replace(/&/g, '&'); }, /** -- 2.20.1