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

Relax HTML allowlist #301

Closed
yhatt opened this issue May 21, 2022 · 4 comments · Fixed by #383
Closed

Relax HTML allowlist #301

yhatt opened this issue May 21, 2022 · 4 comments · Fixed by #383

Comments

@yhatt
Copy link
Member

yhatt commented May 21, 2022

Marp Core's default HTML allowlist is only allowed <br> tag. It's definitely safe but but this default set is not matching with real use case. A lot of Marp users enjoy using custom HTML tags.

It is better to update default allowlist of HTML to include allowed elements in common Marp slides and Web services. e.g. <div>, <span>, and HTML elements that are converted by Markdown.

https://github.com/gjtorikian/html-pipeline/blob/HEAD/lib/html/pipeline/sanitization_filter.rb is mentioned as GitHub style sanitization from some famous Markdown parsers. (remark, marked-sanitizer-github)

@yhatt yhatt moved this to Todo in Marp Roadmap May 21, 2022
@RicardoMonteiroSimoes

This comment was marked as off-topic.

@yhatt

This comment was marked as off-topic.

@RicardoMonteiroSimoes

This comment was marked as off-topic.

@yhatt yhatt pinned this issue Feb 10, 2023
@nikhilweee
Copy link

I would advocate for allowing <span> tags as then I can use different colors for different parts of the slide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants