russross/blackfriday — pull request #5 by bmatsuo (2011-12-12 03:55:01+00:00)
Title: Add HTML options (escape HTML input & replace image w/ text link) 

This patch adds two HTML options. Both have inline tests, and flags in the example `markdown` command. Check out the additions to `inline_test.go` to see expected output when using the options.

- `HTML_REPLACE_IMAGES`

This tag replaces images with text links to their sources. The link content is (depending on the strings' existence) either, the image's title, alttext, or source. Strings are checked in that order.

Use `markdown -img2link` to use this option in the example command.

- `HTML_ESCAPE_HTML`

This options runs block HTML, as well as raw tags, through attrEscape. Simple. Effectively, it's like `HTML_SKIP_HTML`. But, it's more direct in informing user's that raw HTML is not allowed.

use `markdown -htmlesc` to use this option in the example command.