summaryrefslogtreecommitdiff
path: root/render
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2005-05-16 00:55:43 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2005-05-16 00:55:43 +0000
commit642a3d62f28fbffea4b68c66beeabeb9b8fba1c9 (patch)
treee406ab4a9f329dc7209ddd5867342dfb292756e3 /render
parent4a80b3cccf5f1de25b843c7e2ada7dfb08034728 (diff)
downloadnetsurf-642a3d62f28fbffea4b68c66beeabeb9b8fba1c9.tar.gz
netsurf-642a3d62f28fbffea4b68c66beeabeb9b8fba1c9.tar.bz2
[project @ 2005-05-16 00:55:43 by jmb]
Fix issue with erroneously appending a space to the end of every line of textarea input - should we actually be examining box->space here, instead? svn path=/import/netsurf/; revision=1724
Diffstat (limited to 'render')
-rw-r--r--render/form.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/render/form.c b/render/form.c
index ea7289934..aae98938a 100644
--- a/render/form.c
+++ b/render/form.c
@@ -457,8 +457,9 @@ char *form_textarea_value(struct form_control *textarea)
if (text_box->type == BOX_INLINE) {
strncpy(s, text_box->text, text_box->length);
s += text_box->length;
- if (text_box->next)
- /* only add space if this isn't the last box */
+ if (text_box->next && text_box->next->type != BOX_BR)
+ /* only add space if this isn't
+ * the last box on a line (or in the area) */
*s++ = ' ';
} else { /* BOX_BR */
*s++ = '\r';