Closed fulmicoton closed 12 years ago
I agree that sanitize should be exposed as a flag to the CLI, but this does need some refactoring. I'll work on it this evening and see if I can come up with a clean way to handle this.
I've refactored your pull request a bit, I think this is simpler and a little easier to maintain and later extend if necessary. It's pushed and published to npm. Let me know if this works for you.
Just tested it. Thank you very much!
As stated by Markdown's creator, the whole idea of Markdown's language is not to cover the whole HTML. Inserting HTML tag is actually allowed in the original language. It comes especially handy when trying to write tables. Marked does not sanitize html by default. This patch adds a command line option to override this behavior.
I'd appreciate if you could pull this patch or implement such a functionality. The patch has been written has small as possible : you may want to choose a different command line or refactor things a bit.