[ 'default' => [ 'HTML.Doctype' => 'HTML 4.01 Transitional', 'HTML.Allowed' => 'div,b,strong,i,em,u,a[href|title|target|rel],ul,ol,li,p,br,span,img[src|alt|width|height|class],blockquote,pre,code,table,thead,tbody,tr,th,td,h1,h2,h3,h4,h5,h6,hr,small,sub,sup', 'CSS.AllowedProperties' => 'text-align,float,margin,width,height,max-width,color,background-color,font-size,font-weight,font-style', 'AutoFormat.AutoParagraph' => false, 'AutoFormat.RemoveEmpty' => true, 'Attr.AllowedFrameTargets' => ['_blank'], 'Attr.AllowedRel' => ['nofollow', 'noopener', 'noreferrer'], 'HTML.TargetBlank' => true, 'URI.AllowedSchemes' => ['http', 'https', 'mailto', 'tel', 'data'], 'URI.MakeAbsolute' => false, 'Cache.DefinitionImpl' => null, ], 'article' => [ 'HTML.Doctype' => 'HTML 4.01 Transitional', // 后台富文本(Quill)会产出 class:ql-align-*/ql-size-*/ql-indent-* 等, // 同时首页 Hero 默认内容也用 class 排版;故对常用块级/行内标签放开 class, // 仅保留白名单标签与安全的 CSS 属性(style 仍受 CSS.AllowedProperties 约束)。 'HTML.Allowed' => 'div[class|style],b[style],strong[style],i[style],em[style],u[style],a[href|title|target|rel|class|style],ul[class|style],ol[class|style],li[class|style],p[class|style],br,span[class|style],img[src|alt|width|height|class|style],blockquote[class|style],pre[class|style],code[class|style],table[class|style],thead[class|style],tbody[class|style],tr[class|style],th[class|style],td[class|style],h1[class|style],h2[class|style],h3[class|style],h4[class|style],h5[class|style],h6[class|style],hr,small[class|style],sub,sup', 'CSS.AllowedProperties' => 'text-align,float,margin,margin-left,margin-right,padding,padding-left,width,height,max-width,color,background-color,font-size,font-weight,font-style', 'AutoFormat.AutoParagraph' => false, 'AutoFormat.RemoveEmpty' => false, 'Attr.AllowedFrameTargets' => ['_blank'], 'Attr.AllowedRel' => ['nofollow', 'noopener', 'noreferrer'], 'HTML.TargetBlank' => true, 'URI.AllowedSchemes' => ['http', 'https', 'mailto', 'tel', 'data'], 'URI.MakeAbsolute' => false, 'Cache.DefinitionImpl' => null, ], ], 'custom_definition' => [], ];