class Nokogiri::XML::Node

def write_html_to io, options = {}

See Node#write_to for a list of +options+

Write Node as HTML to +io+ with +options+
##
def write_html_to io, options = {}
  # FIXME: this is a hack around broken libxml versions
  return (io << dump_html) if Nokogiri.uses_libxml? && %w[2 6] === LIBXML_VERSION.split('.')[0..1]
  options[:save_with] ||= SaveOptions::DEFAULT_HTML
  write_to io, options
end