module Kramdown::Utils::Html

def escape_html(str, type = :all)

entities.
:attribute - all special HTML characters including the quotation mark but no
\- all special HTML characters except the quotation mark but no entities and
is escaped: :all - all special HTML characters as well as entities, :text
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