[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
This commit is contained in:
John Mark Bell 2005-05-16 00:55:43 +00:00
parent 4a80b3cccf
commit 642a3d62f2
1 changed files with 3 additions and 2 deletions

View File

@ -457,8 +457,9 @@ char *form_textarea_value(struct form_control *textarea)
if (text_box->type == BOX_INLINE) { if (text_box->type == BOX_INLINE) {
strncpy(s, text_box->text, text_box->length); strncpy(s, text_box->text, text_box->length);
s += text_box->length; s += text_box->length;
if (text_box->next) if (text_box->next && text_box->next->type != BOX_BR)
/* only add space if this isn't the last box */ /* only add space if this isn't
* the last box on a line (or in the area) */
*s++ = ' '; *s++ = ' ';
} else { /* BOX_BR */ } else { /* BOX_BR */
*s++ = '\r'; *s++ = '\r';