nlf / markitup

simple markdown to html converter, with code syntax highlighting
7 stars 2 forks source link

Added option for sanitizing HTML #3

Closed fulmicoton closed 12 years ago

fulmicoton commented 12 years ago

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.

nlf commented 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.

nlf commented 12 years ago

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.

fulmicoton commented 12 years ago

Just tested it. Thank you very much!