refactor:富文本内容默认对 XSS 代码进行清理

This commit is contained in:
妙码生花 2023-08-02 15:47:33 +08:00
parent 5b03f2bcbb
commit e5edc6f750
2 changed files with 2 additions and 2 deletions

View File

@ -742,7 +742,7 @@ class Crud extends Backend
{
if ($field['designType'] == 'editor') {
$this->formVueData['bigDialog'] = 'true'; // form 使用较宽的 Dialog
$this->controllerData['filterRule'] = "\n" . Helper::tab(2) . '$this->request->filter(\'trim,htmlspecialchars\');';// 修改变量过滤规则
$this->controllerData['filterRule'] = "\n" . Helper::tab(2) . '$this->request->filter(\'clean_xss\');';// 修改变量过滤规则
}
// 默认排序字段

View File

@ -62,7 +62,7 @@ class Config extends Backend
$all = $this->model->select();
foreach ($all as $item) {
if ($item['type'] == 'editor') {
$this->request->filter('trim,htmlspecialchars');
$this->request->filter('clean_xss');
break;
}
}