feat: add floating social share buttons and restore text justification
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user