-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
render html/markdown for new comment notification email #3255
render html/markdown for new comment notification email #3255
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi @kimsible,
In its current state, this PR is using marked
while we use markdown-it
for the client render, c.f. https://github.com/Chocobozzz/PeerTube/blob/develop/client/src/app/core/renderer/markdown.service.ts. Could you align with our client service and make use of markdown-it in the server too?
As for the way you render HTML, please note we make use of sanitize-html
to provide security as per scenario 2 of https://github.com/markdown-it/markdown-it/blob/master/docs/security.md. Could you align in that matter too?
Hi @rigelk,
I hesitated because
Thanks I forgot that point ! |
@rigelk I've checked the code and I have 2 notices :
|
@kimsible please stick with
We sanitize the display, not the storage. Anyway, applying the sanitization is not a costly extra step 😉 |
d688ef0
to
22f2f72
Compare
22f2f72
to
88f440b
Compare
88f440b
to
5203c30
Compare
@kimsible thanks a bunch :) |
@rigelk thanks for your help ! |
) Co-authored-by: kimsible <[email protected]> Co-authored-by: Rigel Kent <[email protected]>
Fix #3254