[DomCrawler] fixed HTML5 form attribute handling
merged branch kepten/ticket_6239 (PR #8197)

This PR was squashed before being merged into the 2.3 branch (closes #8197).

Discussion
----------

[DomCrawler] fixed HTML5 form attribute handling

Fixed HTML5 form attribute handling and improved a test case to test more thoroughly

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #6239
| License       | MIT
| Doc PR        | no

Commits
-------

04e730e [DomCrawler] fixed HTML5 form attribute handling