Browse Source

remove space character in tag

master
filesite 7 months ago
parent
commit
d79a929909
  1. 3
      plugins/Common.php
  2. 1
      themes/tajian/controller/FrontapiController.php

3
plugins/Common.php

@ -11,6 +11,9 @@ Class Common {
'<', '<',
'>', '>',
'\/', '\/',
' ',
';',
';',
); );
return str_replace($findChars, '', $str); return str_replace($findChars, '', $str);

1
themes/tajian/controller/FrontapiController.php

@ -894,6 +894,7 @@ eof;
if (empty($tag_to_add)) { if (empty($tag_to_add)) {
$err = "参数错误,缺少tag传参"; $err = "参数错误,缺少tag传参";
}else { }else {
$tag_to_add = Common::cleanSpecialChars($tag_to_add);
$tagLen = mb_strlen($tag_to_add, 'utf-8'); $tagLen = mb_strlen($tag_to_add, 'utf-8');
if ($tagLen < 2 || $tagLen > 15) { if ($tagLen < 2 || $tagLen > 15) {
$err = '分类名长度不符合规则,请填写 2 - 15 个汉字、数字、英文字符'; $err = '分类名长度不符合规则,请填写 2 - 15 个汉字、数字、英文字符';

Loading…
Cancel
Save