From: Tim Düsterhus Date: Sun, 9 Feb 2020 14:19:15 +0000 (+0100) Subject: Merge branch 'master' into next X-Git-Tag: 5.2.3~42 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c9f823facbb7ee3d663abc625eb12daa6b752e72;p=GitHub%2FWoltLab%2FWCF.git Merge branch 'master' into next --- c9f823facbb7ee3d663abc625eb12daa6b752e72 diff --cc wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Message/Share.js index 90d30840d5,e3a75a55e7..a4e0ad8a27 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Message/Share.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Message/Share.js @@@ -82,9 -56,8 +82,9 @@@ define(['EventHandler', 'StringUtil'], }, whatsApp: { link: elBySel('.jsShareWhatsApp', container), - share: (function() { + share: (function(event) { + event.preventDefault(); - window.location.href = 'whatsapp://send?text=' + this._pageDescription + '%20' + pageUrl; + window.location.href = 'https://api.whatsapp.com/send?text=' + this._pageDescription + '%20' + this._pageUrl; }).bind(this) } }; diff --cc wcfsetup/install/files/lib/data/language/LanguageEditor.class.php index ddd4eab9f5,63b8d79142..fa1bd3f10c --- a/wcfsetup/install/files/lib/data/language/LanguageEditor.class.php +++ b/wcfsetup/install/files/lib/data/language/LanguageEditor.class.php @@@ -312,16 -311,12 +312,22 @@@ class LanguageEditor extends DatabaseOb /** @var \DOMElement $element */ foreach ($elements as $element) { $itemName = $element->getAttribute('name'); + + // Safeguard against malformed phrases, an empty name has a strange side effect. + if (empty($itemName)) { + throw new \InvalidArgumentException("The name attribute is missing or empty."); + } + + if ($itemName !== $categoryName && strpos($itemName, $categoryName . '.') !== 0) { + throw new \InvalidArgumentException(WCF::getLanguage()->getDynamicVariable( + 'wcf.acp.language.import.error.categoryMismatch', + [ + 'categoryName' => $categoryName, + 'languageItem' => $itemName + ] + )); + } + $itemValue = $element->nodeValue; $itemData[] = $this->languageID;