Skip to content

Fix printing badges with malformed HTML#5437

Merged
ThiefMaster merged 1 commit intoindico:masterfrom
UNOG-Indico:fix/badge-with-malformed-html
Aug 4, 2022
Merged

Fix printing badges with malformed HTML#5437
ThiefMaster merged 1 commit intoindico:masterfrom
UNOG-Indico:fix/badge-with-malformed-html

Conversation

@OmeGak
Copy link
Copy Markdown
Member

@OmeGak OmeGak commented Aug 4, 2022

This fix handles both plain text and rich markdown elements. It's not perfect, as it strips unclosed tags, but at least it doesn't trigger an unhandled exception. These are examples of how different content is rendered in the badge.

Plain text input elements:

content rendering
<x <x
<x foo

Rich markdown input elements:

content rendering
<x
<span sytle="color: red;">foo</span> foo

@OmeGak OmeGak force-pushed the fix/badge-with-malformed-html branch from 9ce03cb to 90a6046 Compare August 4, 2022 09:08
@OmeGak OmeGak force-pushed the fix/badge-with-malformed-html branch from 90a6046 to e765b57 Compare August 4, 2022 13:28
@ThiefMaster ThiefMaster merged commit b9179c2 into indico:master Aug 4, 2022
@ThiefMaster ThiefMaster deleted the fix/badge-with-malformed-html branch August 4, 2022 13:54
@ThiefMaster ThiefMaster restored the fix/badge-with-malformed-html branch August 4, 2022 13:54
@ThiefMaster ThiefMaster deleted the fix/badge-with-malformed-html branch August 4, 2022 13:54
@ThiefMaster ThiefMaster restored the fix/badge-with-malformed-html branch August 4, 2022 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants