diff options
author | bptato <nincsnevem662@gmail.com> | 2024-01-19 20:42:10 +0100 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2024-01-19 20:49:35 +0100 |
commit | 5bca2c6e71f86558625b406c6380abba558d94fc (patch) | |
tree | 527d9cad7105ceac2acf11d0553787dd4bf879ce /src/server | |
parent | 5d3302287ff98c437c5c7592b32e1583e4b7362b (diff) | |
download | chawan-5bca2c6e71f86558625b406c6380abba558d94fc.tar.gz |
Fix form action when submitter has a "form" attr
* Unify form variable for all form-associated elements * Fix broken form association logic in resetFormOwner * Use form action for all form-associated submitters * Remove unused getElementsByTag + de-extern some functions
Diffstat (limited to 'src/server')
-rw-r--r-- | src/server/buffer.nim | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/server/buffer.nim b/src/server/buffer.nim index fbeb772c..ba94ec34 100644 --- a/src/server/buffer.nim +++ b/src/server/buffer.nim @@ -1246,10 +1246,11 @@ proc submitForm(form: HTMLFormElement, submitter: Element): Option[Request] = return let entrylist = form.constructEntryList(submitter).get(@[]) - let action = if submitter.action() == "": - $form.document.url + let subAction = submitter.action() + let action = if subAction != "": + subAction else: - submitter.action() + $form.document.url let url = submitter.document.parseURL(action) if url.isNone: |