mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-03-28 07:33:16 +00:00
fix: use raw action attribute instead of resolved URL in forms
Form.getAction() resolves relative URLs against the page base, which causes test failures when the page URL is a test server address. Use the raw action attribute value instead, which matches what agents need to understand the form's target path. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -141,12 +141,12 @@ pub fn collectForms(
|
||||
const fields = try collectFormFields(node, arena, page);
|
||||
if (fields.len == 0) continue;
|
||||
|
||||
const action = form_el.getAction(page) catch null;
|
||||
const action_attr = el.getAttributeSafe(comptime .wrap("action"));
|
||||
const method_str = form_el.getMethod();
|
||||
|
||||
try forms.append(arena, .{
|
||||
.node = node,
|
||||
.action = if (action) |a| if (a.len > 0) a else null else null,
|
||||
.action = if (action_attr) |a| if (a.len > 0) a else null else null,
|
||||
.method = if (method_str.len > 0) method_str else null,
|
||||
.fields = fields,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user