You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Are there any way to disable, lets say, image adding for Markdown?
I'm using Markdown markup for my blog — for articles and comments. Articles should have full support for Markdown including HTML, but comments should allow only minimal markup w/o images and HTML.
You can do this with Python-Markdown's Extension API (see the built-in safe_mode to disallow html). In fact, the Extension API should allow you to change any part of the parser you want to do pretty much anything you want. Of course, you'll need to create your own extension (unless a third party extension already meets your needs).
However, I think a better tool would be to use something like Bleach after running markdown for something like this. In fact, I recommend Bleach over our own so-called 'safe_mode`.
Activity
waylan commentedon Jan 15, 2013
You can do this with Python-Markdown's Extension API (see the built-in safe_mode to disallow html). In fact, the Extension API should allow you to change any part of the parser you want to do pretty much anything you want. Of course, you'll need to create your own extension (unless a third party extension already meets your needs).
However, I think a better tool would be to use something like Bleach after running markdown for something like this. In fact, I recommend Bleach over our own so-called 'safe_mode`.