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:
parent
5ca47be92c
commit
d59a63079a
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user