Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate attributes are not handled the same than in the HTML specification. #242

Open
stof opened this issue Dec 4, 2023 · 1 comment

Comments

@stof
Copy link
Contributor

stof commented Dec 4, 2023

Parsing a document containing <button type="submit" class="btn btn-outline-secondary rounded-right" type="button">Test</button> produces a DOM element with a type attribute set to button.
However, the HTML specification explicitly says that duplicate attributes must be ignored: https://html.spec.whatwg.org/multipage/parsing.html#parse-error-duplicate-attribute This means that the first one should win, giving a type of submit.

See symfony/symfony#52889 for the original report

stronk7 added a commit to stronk7/moodle that referenced this issue Jan 5, 2024
Because of Masterminds/html5-php#242

that duplicate attribute is causing problems. As far as we don't
need it, we proceed to remove leaving only the type=submit that
will make NonJS behat tests (BrowserKit) happy.
@goetas
Copy link
Member

goetas commented Jul 17, 2024

is anyone willing to provide a fix for this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants