fixing breaks... again

This commit is contained in:
ngn 2023-06-11 20:53:08 +03:00 committed by GitHub
parent d1240e6f4c
commit 41d2da598b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -46,7 +46,7 @@ export default {
if (res.data["error"] === 3) if (res.data["error"] === 3)
return this.$router.push({ path: "/blog" }) return this.$router.push({ path: "/blog" })
this.post = res.data["post"] this.post = res.data["post"]
this.post["content"] = this.post["content"].replaceAll("\n<br>\n<br>\n", "\n") this.post["content"] = this.post["content"].replaceAll("\n<br>\n<br>\n", "\n\n")
this.content = DOMPurify.sanitize( this.content = DOMPurify.sanitize(
marked.parse(this.post["content"], { breaks: true }), marked.parse(this.post["content"], { breaks: true }),
{ ADD_TAGS: ["iframe"], ADD_ATTR: ['allow', 'allowfullscreen', 'frameborder', 'scrolling'] } { ADD_TAGS: ["iframe"], ADD_ATTR: ['allow', 'allowfullscreen', 'frameborder', 'scrolling'] }