1
0
mirror of https://gitee.com/koogua/course-tencent-cloud.git synced 2025-06-23 03:50:56 +08:00

过滤html实体编码xss

This commit is contained in:
xiaochong0302 2023-05-07 16:25:16 +08:00
parent 5ca47be92c
commit d59a63079a

View File

@ -23,6 +23,7 @@ class Purifier
*/
protected $options = [
'CSS.AllowedProperties' => 'color,font-size,text-align,background-color',
'Core.EscapeNonASCIICharacters' => true,
'AutoFormat.AutoParagraph' => true,
'AutoFormat.RemoveEmpty' => true,
'HTML.TargetBlank' => true,
@ -57,7 +58,7 @@ class Purifier
$serializerPath = cache_path('purifier');
if (file_exists($serializerPath) == false) {
if (!file_exists($serializerPath)) {
mkdir($serializerPath, 0777);
}