From a122b94efde125202388d135e36eb86e6d25d093 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Sun, 24 Jul 2016 21:00:29 +0100 Subject: URL escape: Simplify to avoid unnecessary allocation. This removes the toskip parameter, which was only used by the RISC OS front end. The toskip param was used to skip 8 characters which did not need to be escaped from the start of the URL. The RISC OS front end now orders the steps of its URL construction to avoid the need for this. --- render/form.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'render') diff --git a/render/form.c b/render/form.c index f8d0ce5fd..8ae59b5ed 100644 --- a/render/form.c +++ b/render/form.c @@ -912,7 +912,7 @@ static char *form_url_encode(struct form *form, } for (; control; control = control->next) { - url_err = url_escape(control->name, 0, true, NULL, &name); + url_err = url_escape(control->name, true, NULL, &name); if (url_err == NSERROR_NOMEM) { free(s); return NULL; @@ -920,7 +920,7 @@ static char *form_url_encode(struct form *form, assert(url_err == NSERROR_OK); - url_err = url_escape(control->value, 0, true, NULL, &value); + url_err = url_escape(control->value, true, NULL, &value); if (url_err == NSERROR_NOMEM) { free(name); free(s); -- cgit v1.2.3