Bug 58111

Summary: [testcase] Copy/Paste of selection in khtml adds spaces after <br>
Product: [Applications] konqueror Reporter: Philippe Fremy <phil>
Component: khtmlAssignee: Konqueror Developers <konq-bugs>
Status: RESOLVED UNMAINTAINED    
Severity: normal CC: porten, samuel.brack
Priority: NOR    
Version: 4.5.4   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: testcase for the selection problem.

Description Philippe Fremy 2003-05-04 16:15:35 UTC
Version:            (using KDE KDE 3.1.1a)
Installed from:    Gentoo Packages

In the file attached, if you select the three lines and copy/paste them into an editor, you will get the lines bof and hop indented with one space. The line coucou is indented properly.
Comment 1 Philippe Fremy 2003-05-04 16:16:55 UTC
Created attachment 1484 [details]
testcase for the selection problem.
Comment 2 Kai Lahmann 2003-06-14 22:39:27 UTC
<>coucou 
 hop 
 bof 
 </> 
..even the empty line after has this. confirmed. 
Comment 3 Philippe Fremy 2004-05-10 18:48:02 UTC
Bug is still there with kde 3.2.2
Comment 4 Maksim Orlovich 2004-05-29 19:42:06 UTC
Hmm. Seems to work fine for me in HEAD, though.
Comment 5 Sebastian Sauer 2004-11-29 20:42:45 UTC
Still reproducable with KDE 3.3.1
Comment 6 Marijn Schouten 2006-04-18 18:08:14 UTC
confirmed in 3.5.2
Comment 7 Michael Leupold 2008-04-06 06:19:16 UTC
Confirmed in trunk r793971.
Comment 8 Harri Porten 2010-02-28 14:58:16 UTC
Tracked it down to the RenderText objects holding the leading whitespace after setText() calls DOMStringImpl::collapseWhiteSpace() which again converts the newline into a space.
Comment 9 Samuel Brack 2011-01-01 19:42:59 UTC
Confirmed in 4.5.4, updating version.
Comment 10 Justin Zobel 2021-03-21 00:25:04 UTC
Thank you for the bug report.

As this report hasn't seen any changes in 10 years or more, we ask if you can please confirm that the issue still persists.

If this bug is no longer persisting or relevant please change the status to resolved.
Comment 11 Christoph Cullmann 2024-05-06 18:40:10 UTC
Dear user,

KHTML (and KJS) was a long time more or less unmaintained and got removed in KF6.

Please migrate to use a QWebEngine based HTML component.

We will do no further fixes or improvements to the KF5 branches of these components beside important security fixes.

For security issues, please see:

https://kde.org/info/security/

Sorry that we did not fix this issue during the life-time of KHTML.

Greetings
Christoph Cullmann