feat: styling
This commit is contained in:
parent
8424b7b98b
commit
4adab40932
17 changed files with 330 additions and 36 deletions
11
composables/santize.ts
Normal file
11
composables/santize.ts
Normal file
|
@ -0,0 +1,11 @@
|
|||
import SanitizeHTML from 'sanitize-html'
|
||||
|
||||
export function sanitize(text: string) {
|
||||
return SanitizeHTML(text, {
|
||||
allowedAttributes: {
|
||||
a: ['href', 'name', 'target', 'class'],
|
||||
span: ['class'],
|
||||
img: ['src', 'srcset', 'alt', 'title', 'width', 'height', 'loading'],
|
||||
},
|
||||
})
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue