Recursively escape disallowed html tags in manga and tracker descriptions
In case there the description contained something like "<some text that is interpreted as an invalid html tag>", it was sanitized to "<some" with the rest of the text in the "tag" getting removed.
This commit is contained in:
@@ -64,7 +64,7 @@ export const DescriptionGenre = ({
|
|||||||
mb: OPEN_CLOSE_BUTTON_HEIGHT,
|
mb: OPEN_CLOSE_BUTTON_HEIGHT,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{parseHtml(sanitizeHtml(description, { disallowedTagsMode: 'escape' }))}
|
{parseHtml(sanitizeHtml(description, { disallowedTagsMode: 'recursiveEscape' }))}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Collapse>
|
</Collapse>
|
||||||
<Stack
|
<Stack
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ const TrackerMangaCardSummary = ({ summary }: { summary: string }) => {
|
|||||||
{summary.length && (
|
{summary.length && (
|
||||||
<Collapse collapsedSize={summaryCollapsedSize} in={isSummaryExpanded}>
|
<Collapse collapsedSize={summaryCollapsedSize} in={isSummaryExpanded}>
|
||||||
<Typography ref={summaryRef} variant="body1" component="p" sx={{ whiteSpace: 'pre-line' }}>
|
<Typography ref={summaryRef} variant="body1" component="p" sx={{ whiteSpace: 'pre-line' }}>
|
||||||
{parseHtml(sanitizeHtml(summary, { disallowedTagsMode: 'escape' }))}
|
{parseHtml(sanitizeHtml(summary, { disallowedTagsMode: 'recursiveEscape' }))}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Collapse>
|
</Collapse>
|
||||||
)}
|
)}
|
||||||
|
|||||||
Reference in New Issue
Block a user