Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix printing badges with malformed HTML #5437

Merged

Conversation

OmeGak
Copy link
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