-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Is there a way to white-list specific HTML tags when sanitize is true? #133
Comments
This should actually be fairly simple. I'll mess around with something. |
+1 |
+1. This would be fantastic. |
+1 push |
+1 |
1 similar comment
+1 |
Seeing as how this isn't in there quite yet I'll try and take a stab at doing it myself sometime this week for you guys. I don't know the code yet so be patient. Hopefully I can figure out how to white-list specific tags and make this the most complete JS markdown library out there :D. I'll link to the fork here when I'm finished. |
yes please, 👍 for whitelist of tags i want to enable markdown for and others (e.g. images using |
Why exactly was this issue closed? Seems still to be relevant to me! |
Wondered that myself. sad face |
Well it's not closed, but it was supposedly simple to implement. |
Oh right, the referenced issue is closed. Got it =P. |
Another +1 on this. |
+1 |
This feature would be very useful. |
A workaround is to not use the sanitize feature of Markdown, but instead pass the resulting HTML through a tool that focuses just on HTML sanitizing, like the The Markdown spec does not include any notion of HTML sanitizing. Sanitizing is a separate task that is well served by using a separate module. |
@markstos - thanks |
I love the sanitize feature and most markdown libraries don't include it or do it very badly. However, there is one feature that Marked does not have that my previous library did, the ability to white-list specific tags or a default set of tags (see node-markdown). Is it possible to have this added to Marked?
This library is the best javascript markdown library I've seen. The main attraction for me is the ability to use it on the server and on the client so I can generate Markdown previews for the user without making ajax calls or having differences between the client library and the server library. If I can just enable specific tags when sanitize is true that would complete the library for me.
The text was updated successfully, but these errors were encountered: