diff --git a/src/www_msgs.c b/src/www_msgs.c index 0ffd34e..7829efc 100644 --- a/src/www_msgs.c +++ b/src/www_msgs.c @@ -726,15 +726,21 @@ static char *www_wordwrap(char *content, int cutoff) { } if (content[i] == '\r' && content[i+1] != '\r') { - if (content[i+1] == ' ' || quote_line != 1) { + if (content[i+1] == ' ' && quote_line != 1) { content[at++] = '\r'; line_count = 0; quote_line = 0; } else { if (at > 0 && content[at-1] != '\r' && content[at-1] != ' ') { - content[at++] = ' '; - line_count++; - } + if (quote_line != 1) { + content[at++] = ' '; + line_count++; + } else { + content[at++] = '\r'; + line_count = 0; + quote_line = 0; + } + } } } else if (content[i] == '\r' && content[i+1] == '\r') { content[at++] = '\r';