调整关键词过滤

This commit is contained in:
邹景立 2021-09-17 14:53:08 +08:00
parent d7a9fc09a7
commit c1d7242a88
2 changed files with 3 additions and 1 deletions

View File

@ -101,6 +101,8 @@ class Auto extends Controller
if ($this->request->isGet()) {
$public = dirname($this->request->basefile(true));
$this->defaultImage = "{$public}/static/theme/img/image.png";
} else {
$data['content'] = strip_tags($data['content'] ?? '', '<a>');
}
}

View File

@ -169,7 +169,7 @@ class Keys extends Controller
if (WechatKeys::mk()->where($map)->count() > 0) {
$this->error('该关键字已经存在!');
}
$data['content'] = strip_tags($data['content'], '<a>');
$data['content'] = strip_tags($data['content'] ?? '', '<a>');
} elseif ($this->request->isGet()) {
$public = dirname($this->request->basefile(true));
$this->defaultImage = "{$public}/static/theme/img/image.png";