diff options
author | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2014-01-02 19:07:52 +0000 |
---|---|---|
committer | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2014-01-02 19:07:52 +0000 |
commit | 78aec7cecc05420086072d90a0519252fc5a58c1 (patch) | |
tree | 7038bac76cf79ba78122133757893c5d82523fc7 | |
parent | 9bd355e30c1f6aa57d42fe4f2fa6e9f521f002a4 (diff) | |
download | netsurf-78aec7cecc05420086072d90a0519252fc5a58c1.tar.gz |
Store a non-converted filename in the form alongside the UTF-8 version.
-rw-r--r-- | render/form.h | 1 | ||||
-rw-r--r-- | render/html.c | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/render/form.h b/render/form.h index 9088ca293..9229ad219 100644 --- a/render/form.h +++ b/render/form.h @@ -91,6 +91,7 @@ struct form_control { char *name; /**< Control name */ char *value; /**< Current value of control */ char *initial_value; /**< Initial value of control */ + char *filename_value; /**< Original supplied filename (file upload only) */ bool disabled; /**< Whether control is disabled */ struct box *box; /**< Box for control */ diff --git a/render/html.c b/render/html.c index 1e7350cf1..376c2ab6e 100644 --- a/render/html.c +++ b/render/html.c @@ -1768,6 +1768,9 @@ static bool html_drop_file_at_point(struct content *c, int x, int y, char *file) free(file_box->gadget->value); file_box->gadget->value = utf8_fn; + free(file_box->gadget->filename_value); + file_box->gadget->filename_value = strdup(file); + /* Redraw box. */ html__redraw_a_box(html, file_box); |