module Kramdown::Utils::Html

def escape_html(str, type = :all)

characters including the quotation mark but no entities.
characters except the quotation mark but no entities and :attribute - all special HTML
is escaped: :all - all special HTML characters as well as entities, :text - all special HTML
Escape the special HTML characters in the string +str+. The parameter +type+ specifies what
def escape_html(str, type = :all)
  str.gsub(ESCAPE_RE_FROM_TYPE[type]) {|m| ESCAPE_MAP[m] || m}
end