This commit is contained in:
Iliyan Angelov
2025-12-10 01:36:00 +02:00
parent 2f6dca736a
commit 6a9e823402
84 changed files with 5293 additions and 1836 deletions

View File

@@ -4,6 +4,7 @@ import Image from "next/legacy/image";
import Link from "next/link";
import { useBlogPost } from "@/lib/hooks/useBlog";
import { getValidImageUrl, getValidImageAlt, FALLBACK_IMAGES } from "@/lib/imageUtils";
import { sanitizeHTML } from "@/lib/security/sanitize";
const BlogSingle = () => {
const params = useParams();
@@ -184,7 +185,7 @@ const BlogSingle = () => {
{post.content && (
<div
className="article-content enterprise-content"
dangerouslySetInnerHTML={{ __html: post.content }}
dangerouslySetInnerHTML={{ __html: sanitizeHTML(post.content) }}
/>
)}
</div>
@@ -199,7 +200,7 @@ const BlogSingle = () => {
</h6>
<div className="social-share">
<Link
href={`https://www.linkedin.com/shareArticle?mini=true&url=${typeof window !== 'undefined' ? encodeURIComponent(window.location.href) : ''}&title=${encodeURIComponent(post.title)}`}
href="https://linkedin.com"
target="_blank"
rel="noopener noreferrer"
className="share-btn share-linkedin"