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

Open
yhatt opened this issue May 21, 2022 · 4 comments
Open

Relax HTML allowlist #301

yhatt opened this issue May 21, 2022 · 4 comments

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)

@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
Projects
Status: Todo
Development

No branches or pull requests

3 participants