Escaping of markdown is extracted into a gem.

[1] https://github.com/badeball/escape_markdown
[2] https://rubygems.org/gems/escape_markdown