Automatic removal of commas from tag names
authorMarcel Werk <burntime@woltlab.com>
Thu, 1 Oct 2020 16:27:19 +0000 (18:27 +0200)
committerMarcel Werk <burntime@woltlab.com>
Thu, 1 Oct 2020 16:27:19 +0000 (18:27 +0200)
wcfsetup/install/files/lib/acp/form/TagAddForm.class.php

index 212fcb4316f515ab407b788d7b41c0469a46e773..7e0f3157ec2c7f73650b5b1ce626c79124c2a8f4 100644 (file)
@@ -73,7 +73,7 @@ class TagAddForm extends AbstractForm {
        public function readFormParameters() {
                parent::readFormParameters();
                
-               if (isset($_POST['name'])) $this->name = StringUtil::trim($_POST['name']);
+               if (isset($_POST['name'])) $this->name = str_replace(',', '', StringUtil::trim($_POST['name']));
                if (isset($_POST['languageID'])) $this->languageID = intval($_POST['languageID']);
                
                // actually these are synonyms