Correct handling of action="": should submit to the document URL, not the base URL.

svn path=/trunk/netsurf/; revision=11799
This commit is contained in:
John Mark Bell 2011-02-25 19:56:28 +00:00
parent 021d3afd3e
commit ec39ae69d6
1 changed files with 9 additions and 1 deletions

View File

@ -414,7 +414,15 @@ bool html_convert(struct content *c)
url_func_result res;
/* Make all actions absolute */
res = url_join(f->action, c->data.html.base_url, &action);
if (f->action == NULL || f->action[0] == '\0') {
/* HTML5 4.10.22.3 step 11 */
res = url_join(content__get_url(c),
c->data.html.base_url, &action);
} else {
res = url_join(f->action,
c->data.html.base_url, &action);
}
if (res != URL_FUNC_OK) {
msg_data.error = messages_get("NoMemory");
content_broadcast(c, CONTENT_MSG_ERROR, msg_data);