mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-07-22 06:39:41 +02:00
fix: allow-iframe-embeds (#2009)
* allow embedding iframes * fix alignment issue for buttons
This commit is contained in:
parent
61ccaded2c
commit
ae59f04b9f
2 changed files with 11 additions and 5 deletions
|
@ -20,17 +20,19 @@ export default defineComponent({
|
|||
},
|
||||
setup() {
|
||||
function sanitizeMarkdown(rawHtml: string | null | undefined): string {
|
||||
console.log(rawHtml)
|
||||
if (!rawHtml) {
|
||||
return "";
|
||||
}
|
||||
|
||||
const sanitized = DOMPurify.sanitize(rawHtml, {
|
||||
USE_PROFILES: { html: true },
|
||||
// TODO: some more thought could be put into what is allowed and what isn't
|
||||
ALLOWED_TAGS: ["img", "div", "p"],
|
||||
ADD_ATTR: ["src", "alt", "height", "width", "class"],
|
||||
ALLOWED_TAGS: ["img", "div", "p", "iframe"],
|
||||
ADD_ATTR: ["src", "alt", "height", "width", "class", "allow", "title", "allowfullscreen", "frameborder", "scrolling"],
|
||||
});
|
||||
|
||||
console.log(sanitized)
|
||||
|
||||
return sanitized;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue