module Kramdown::Utils::Html

def escape_html(str, type = :all)

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