mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-26 11:20:03 +00:00
LibWeb: When creating form action URL, only include value for the submit
that was used to submit the form
This commit is contained in:
committed by
Andreas Kling
parent
5c46741be8
commit
7f538ea7eb
@@ -41,7 +41,7 @@ HTMLFormElement::~HTMLFormElement()
|
||||
{
|
||||
}
|
||||
|
||||
void HTMLFormElement::submit()
|
||||
void HTMLFormElement::submit(RefPtr<HTMLInputElement> submitter)
|
||||
{
|
||||
if (action().is_null()) {
|
||||
dbg() << "Unsupported form action ''";
|
||||
@@ -68,7 +68,7 @@ void HTMLFormElement::submit()
|
||||
|
||||
for_each_in_subtree_of_type<HTMLInputElement>([&](auto& node) {
|
||||
auto& input = to<HTMLInputElement>(node);
|
||||
if (!input.name().is_null())
|
||||
if (!input.name().is_null() && (input.type() != "submit" || &input == submitter))
|
||||
parameters.append({ input.name(), input.value() });
|
||||
return IterationDecision::Continue;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user