class Redcarpet::Render::Safe

with the vanilla one.
the lang’s class as the user can basically specify anything
The block_code callback is also overriden not to include
enables escape_html and safe_links_only by default.
A renderer object you can use to deal with users’ input. It

def block_code(code, lang)

def block_code(code, lang)
  "<pre>" \
    "<code>#{html_escape(code)}</code>" \
  "</pre>"
end

def html_escape(string)

should be defined at the C level.
are duplicating existing code from Houdini. This method
TODO: This is far from ideal to have such method as we
def html_escape(string)
  string.gsub(/['&\"<>\/]/, {
    '&' => '&amp;',
    '<' => '&lt;',
    '>' => '&gt;',
    '"' => '&quot;',
    "'" => '&#x27;',
    "/" => '&#x2F;',
  })
end

def initialize(extensions = {})

def initialize(extensions = {})
  super({
    escape_html: true,
    safe_links_only: true
  }.merge(extensions))
end