Skip to content

Commit

Permalink
Fix: Allow id and class attributes (#1066)
Browse files Browse the repository at this point in the history
added exceptions to sanitizeHtml

Co-authored-by: nyagami <[email protected]>
  • Loading branch information
CD-Z and nyagami authored Jun 10, 2024
1 parent f11a10b commit 6f3278f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/screens/reader/utils/sanitizeChapterText.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ export const sanitizeChapterText = (
'li',
]),
allowedAttributes: {
'img': ['src'],
'a': ['href'],
'img': ['src', 'class', 'id'],
'a': ['href', 'class', 'id'],
'div': ['class', 'id'],
'p': ['class', 'id'],
'ol': ['reversed', 'start', 'type'],
},
allowedSchemes: ['data', 'http', 'https', 'file'],
Expand Down

0 comments on commit 6f3278f

Please sign in to comment.