Merge branch 'master' into next
authorTim Düsterhus <duesterhus@woltlab.com>
Sun, 9 Feb 2020 14:19:15 +0000 (15:19 +0100)
committerTim Düsterhus <duesterhus@woltlab.com>
Sun, 9 Feb 2020 14:19:15 +0000 (15:19 +0100)
1  2 
com.woltlab.wcf/page.xml
wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabClean.js
wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Message/Share.js
wcfsetup/install/files/lib/data/language/LanguageEditor.class.php

Simple merge
index 90d30840d5f87af1a5a3b834aa1ef159e20d2144,e3a75a55e782a339c79ca97f6e5b15cc6a0b155a..a4e0ad8a278f87bda3162bb275494788ae9a4bc1
@@@ -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)
                                        }
                                };
index ddd4eab9f590a7753e15dd14f28b2cc2457c5afc,63b8d79142842393b36d96d196f899086413149c..fa1bd3f10ca31e4fe5a252b898578a71b9adcf86
@@@ -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;