diff --git a/src/screens/reader/utils/sanitizeChapterText.ts b/src/screens/reader/utils/sanitizeChapterText.ts index 59db609a..c3370106 100644 --- a/src/screens/reader/utils/sanitizeChapterText.ts +++ b/src/screens/reader/utils/sanitizeChapterText.ts @@ -9,9 +9,6 @@ export const sanitizeChapterText = ( html: string, options?: Options, ): string => { - if (html) { - html = html.replace(/</g, '<').replace(/>/g, '>'); - } let text = sanitizeHtml(html, { allowedTags: sanitizeHtml.defaults.allowedTags.concat([ 'img', @@ -20,10 +17,13 @@ export const sanitizeChapterText = ( 'b', 'a', 'div', + 'ol', + 'li', ]), allowedAttributes: { 'img': ['src'], 'a': ['href'], + 'ol': ['reversed', 'start', 'type'], }, allowedSchemes: ['data', 'http', 'https', 'file'], });