Copying text from mails results in no linebreaks for paragraphs
Open, NormalPublic

Description

This seems to be a textarea bug.

Internally the plain-text copy in the clipboard is prepared by being run through QTextDocument::toPlainText (https://code.woboq.org/qt5/qtbase/src/gui/text/qtextdocument.cpp.html#_ZNK13QTextDocument11toPlainTextEv), which should be doing the job properly (it tries to convert paragraphs to linebreaks, however, the result does not have the necessary linebreaks.

[I] ⋊> kube on develop  xclip -o -t text/plain                                                                                                         22:23:34
This is a mail with manual breaks
Break this down
To the last sentence
This is a new paragraph
This is a very very very very very veryvery very very very very veryvery very very very very very very very very very very very very very very very very very v
ery very very very very very very very long line.
This is a new line.⏎                                                                                                                                           
[I] ⋊> kube on develop  xclip -o -t text/html                                                                                                          22:23:36
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html><head><meta name="qrichtext" content="1" /><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><style type="text/css">
p, li { white-space: pre-wrap; }
</style></head><body>
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><!--StartFragment-->This is a mail wit
h manual breaks<br />Break this down<br />To the last sentence</p>
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This is a new paragraph</p>
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This is a very very very very very ver
yvery very very very very veryvery very very very very very very very very very very very very very very very very very very very very very very very very very
 long line.<br />This is a new line.<!--EndFragment--></p></body></html>⏎

https://code.woboq.org/qt5/qtbase/src/gui/text/qtextdocument.cpp.html#_ZNK13QTextDocument11toPlainTextEv

cmollekopf triaged this task as Normal priority.