summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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';