diff --git a/plugins/Common.php b/plugins/Common.php index 77416c7..993546a 100644 --- a/plugins/Common.php +++ b/plugins/Common.php @@ -11,6 +11,9 @@ Class Common { '<', '>', '\/', + ' ', + ';', + ';', ); return str_replace($findChars, '', $str); diff --git a/themes/tajian/controller/FrontapiController.php b/themes/tajian/controller/FrontapiController.php index 243de46..fb9ab45 100644 --- a/themes/tajian/controller/FrontapiController.php +++ b/themes/tajian/controller/FrontapiController.php @@ -894,6 +894,7 @@ eof; if (empty($tag_to_add)) { $err = "参数错误,缺少tag传参"; }else { + $tag_to_add = Common::cleanSpecialChars($tag_to_add); $tagLen = mb_strlen($tag_to_add, 'utf-8'); if ($tagLen < 2 || $tagLen > 15) { $err = '分类名长度不符合规则,请填写 2 - 15 个汉字、数字、英文字符';