feat: support inline style and style tag

This commit is contained in:
DIYgod 2022-10-02 16:02:57 +01:00
parent 25fa502f5f
commit 0bc9f5d953
No known key found for this signature in database
GPG Key ID: D159328F47A80DCA
2 changed files with 7 additions and 3 deletions

View File

@ -72,10 +72,14 @@ export const renderPageContent = (
.use(rehypeImage, { env })
.use(rehypeSanitize, {
...defaultSchema,
tagNames: [...(defaultSchema.tagNames || []), "video", "iframe"],
tagNames: [...(defaultSchema.tagNames || []), "video", "iframe", "style"],
attributes: {
...defaultSchema.attributes,
div: [...(defaultSchema.attributes?.div || []), ["className"]],
div: [
...(defaultSchema.attributes?.div || []),
["className"],
["style"],
],
code: [["className"]],
blockquote: allowedBlockquoteAttrs,
video: [

View File

@ -343,7 +343,7 @@ export default function SubdomainEditor() {
onChange={(e: ChangeEvent<HTMLInputElement>) =>
updateValue("tags", e.target.value)
}
help="Separate multiple tags with commas"
help='Separate multiple tags with English commas ","'
/>
</div>
<div>