Fix bug 3095552: don't escape URLs after editing. (credit: Martin Bazley)

svn path=/trunk/netsurf/; revision=10911
This commit is contained in:
John Mark Bell 2010-10-27 20:15:01 +00:00
parent 72cf3adc78
commit f309236fa8

View File

@ -360,7 +360,7 @@ node_callback_resp tree_url_node_callback(void *user_data,
struct node_element *element; struct node_element *element;
url_func_result res; url_func_result res;
const char *text; const char *text;
char *norm_text, *escaped_text; char *norm_text;
const struct url_data *data; const struct url_data *data;
/** @todo memory leaks on non-shared folder deletion. */ /** @todo memory leaks on non-shared folder deletion. */
@ -400,11 +400,7 @@ node_callback_resp tree_url_node_callback(void *user_data,
text = msg_data->data.text; text = msg_data->data.text;
if (msg_data->flag == TREE_ELEMENT_URL) { if (msg_data->flag == TREE_ELEMENT_URL) {
res = url_escape(text, 0, false, NULL, res = url_normalize(text, &norm_text);
&escaped_text);
if (res == URL_FUNC_OK)
res = url_normalize(escaped_text,
&norm_text);
if (res != URL_FUNC_OK) { if (res != URL_FUNC_OK) {
if (res == URL_FUNC_FAILED) { if (res == URL_FUNC_FAILED) {
warn_user("NoURLError", 0); warn_user("NoURLError", 0);