feat: add floating social share buttons and restore text justification

This commit is contained in:
2026-05-10 14:30:38 +02:00
parent fe7acfa927
commit 15700036e5
5 changed files with 174 additions and 39 deletions

View File

@@ -7,7 +7,11 @@ import sanitizeHtml from 'sanitize-html';
export function sanitizeHTML(html: string): string {
if (!html) return '';
return sanitizeHtml(html, {
// Remplacer les espaces insécables par des espaces normaux
// Empêche le navigateur de considérer un paragraphe entier comme un seul mot
const cleanHtml = html.replace(/ |\u00A0/g, ' ');
return sanitizeHtml(cleanHtml, {
allowedTags: [
'p', 'br', 'b', 'i', 'em', 'strong', 'a', 'ul', 'ol', 'li',
'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'blockquote', 'span', 'div',