sparklemotion / mechanize

Mechanize is a ruby library that makes automated web interaction easy.
https://www.rubydoc.info/gems/mechanize/
MIT License
4.39k stars 473 forks source link

HTML5 support #592

Open flavorjones opened 2 years ago

flavorjones commented 2 years ago

This issue is a placeholder to track what pieces of HTML5 functionality Mechanize should eventually support.

  1. Mechanize uses Nokogiri::HTML (which is an alias for Nokogiri::HTML4) as the HTML parser. Mechanize needs to provide an option for invoking the Nokogiri::HTML5 parser on platforms where it's available.
  2. 591 points out that Mechanize::Form#fields are set based on searching the form element's DOM subtree. HTML5 allows for form fields to exist outside the form subtree when they have the form attribute (see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-form).