From adf905c2424557b431174ae9de6e4e97e9d4ca20 Mon Sep 17 00:00:00 2001 From: CD-Z Date: Tue, 7 May 2024 22:10:24 +0200 Subject: [PATCH] added exceptions to sanitizeHtml --- src/screens/reader/utils/sanitizeChapterText.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/screens/reader/utils/sanitizeChapterText.ts b/src/screens/reader/utils/sanitizeChapterText.ts index 59db609af..76d791cc4 100644 --- a/src/screens/reader/utils/sanitizeChapterText.ts +++ b/src/screens/reader/utils/sanitizeChapterText.ts @@ -22,8 +22,10 @@ export const sanitizeChapterText = ( 'div', ]), allowedAttributes: { - 'img': ['src'], - 'a': ['href'], + 'img': ['src', 'class', 'id'], + 'a': ['href', 'class', 'id'], + 'div': ['class', 'id'], + 'p': ['class', 'id'], }, allowedSchemes: ['data', 'http', 'https', 'file'], });