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.
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 tobutton
. 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 ofsubmit
.See https://github.com/symfony/symfony/issues/52889 for the original report