When enabled (alongside the gfm option), it will escape certain HTML tags
require "./src/markd"
markdown = <<-MD
# Hello Markd
> Yet another markdown parser built for speed, written in Crystal, Compliant to CommonMark specification.
<title>this isn't allowed</title>
<style>
title {
font-size: 100px;
}
</style>
MD
options = Markd::Options.new(gfm: true, tagfilter: true)
puts Markd.to_html(markdown, options)
Output:
<h1>Hello Markd</h1>
<blockquote>
<p>Yet another markdown parser built for speed, written in Crystal, Compliant to CommonMark specification.</p>
</blockquote>
<title>this isn't allowed</title>
<style>
title {
font-size: 100px;
}
</style>
When enabled (alongside the gfm option), it will escape certain HTML tags
Output: