Skip to content

Support HTML message rendering #21

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

Closed
benmelz opened this issue Sep 19, 2023 · 3 comments · Fixed by #22
Closed

Support HTML message rendering #21

benmelz opened this issue Sep 19, 2023 · 3 comments · Fixed by #22
Assignees
Labels
enhancement New feature or request

Comments

@benmelz
Copy link
Member

benmelz commented Sep 19, 2023

Bustracker:
b4b83499-bc74-485e-919f-77e17dca1c33

This app:
Screenshot 2023-09-19 at 12 27 45 PM

Since Avail supports it, I guess we don't really have a choice either. Shouldn't be that bad, the two possible pain points I foresee are:

  • picking a good sanitized rendering method
  • getting that rendering method to play nice with react
@benmelz benmelz added the enhancement New feature or request label Sep 19, 2023
@benmelz
Copy link
Member Author

benmelz commented Sep 19, 2023

Quick research presents two options:

  • this react feature, which would require us to come up with our own sanitization process
  • this library, which seems to take care of everything, but should probably be vetted a bit VETTING FAILED

@werebus
Copy link
Member

werebus commented Sep 19, 2023

From the FAQ on html-react-parser:

Is this XSS safe?

No, this library is not XSS (cross-site scripting) safe. See #94.

Does invalid HTML get sanitized?

No, this library does not sanitize HTML. See #124, #125, and #141.

@werebus
Copy link
Member

werebus commented Sep 19, 2023

However, possibly useful examples in the comments of one of those issues:

@benmelz benmelz self-assigned this Sep 19, 2023
benmelz added a commit that referenced this issue Sep 19, 2023
Sanitize and render HTML in messages, as the avail bustracker does.

Closes #21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants