diff --git a/attached_assets/image_1772297393060.png b/attached_assets/image_1772297393060.png new file mode 100644 index 0000000..33ac347 Binary files /dev/null and b/attached_assets/image_1772297393060.png differ diff --git a/client/src/pages/article.tsx b/client/src/pages/article.tsx index 93be62b..faa3628 100644 --- a/client/src/pages/article.tsx +++ b/client/src/pages/article.tsx @@ -25,7 +25,7 @@ const ALLOWED_IFRAME_DOMAINS = [ function sanitizeContent(html: string): string { return DOMPurify.sanitize(html, { ADD_TAGS: ["iframe"], - ADD_ATTR: ["allow", "allowfullscreen", "frameborder", "scrolling", "src", "loading"], + ADD_ATTR: ["allow", "allowfullscreen", "frameborder", "scrolling", "src", "loading", "style"], ALLOW_UNKNOWN_PROTOCOLS: false, }); } @@ -178,9 +178,8 @@ export default function ArticlePage() { prose-a:text-primary prose-a:no-underline hover:prose-a:underline prose-strong:text-foreground prose-img:rounded-md prose-img:w-full prose-img:object-cover - [&_iframe]:w-full [&_iframe]:aspect-video [&_iframe]:rounded-md [&_iframe]:my-6 - [&_.embed-container]:relative [&_.embed-container]:w-full [&_.embed-container]:my-6 - [&_.embed-container_iframe]:absolute [&_.embed-container_iframe]:inset-0 [&_.embed-container_iframe]:w-full [&_.embed-container_iframe]:h-full + [&_iframe]:rounded-md [&_iframe]:my-6 [&_iframe]:max-w-full + [&_div[style]]:flex [&_div[style]]:justify-center [&_blockquote]:border-l-primary [&_blockquote]:bg-accent/50 [&_blockquote]:rounded-r-md [&_blockquote]:py-1" dangerouslySetInnerHTML={{ __html: sanitizeContent(article.content) }} data-testid="article-content"