Bug 65722 - [testcase] tab converted to space on copying from browser into clipboard
Summary: [testcase] tab converted to space on copying from browser into clipboard
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: khtml renderer (show other bugs)
Version: 4.5.4
Platform: FreeBSD Ports All
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-10-09 00:31 UTC by Amit
Modified: 2021-03-21 01:06 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Test case html file for the above (398 bytes, text/html)
2003-10-09 00:42 UTC, Amit
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Amit 2003-10-09 00:31:59 UTC
Version:            (using KDE KDE 3.1.1a)
Installed from:    FreeBSD Ports
OS:          FreeBSD

[This is not same as 34923]

When selecting a <pre> formatted text from the browser, a tab is converted into the  equivalent number of spaces. This breaks for example when you are copying a Makefile from a web page.
    For example try selecting the shar file from http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/56709
and paste it into an editor. 
There is a tab  infront of "${REINPLACE_CMD}":
Xpre-configure:
X	${REINPLACE_CMD} -e 's|-pedantic ||g' ${WRKSRC}/configure
X

  When done from Konqueror, the tab gets copied to clipboard as spaces. When done from Mozilla, the tab is retained as a tab.
Comment 1 Amit 2003-10-09 00:42:35 UTC
Created attachment 2714 [details]
Test case html file for the above

- Open tabtospacetestcase.html	in Mozilla and Konqueror.
- Copy and paste the <pre> formatted text elsewhere.

If this were white space specific source code (eg: Makefile), then copy/pasting
will break. Mozilla DTRT.
Comment 2 groot 2004-01-01 17:53:44 UTC
Still in HEAD from dec. 28th. THough it's not clear, the example HTML has tabs between each word; pasting into konsole gives:

beans.ebn.kun.nl$od -c
Select  this    preformatted    text    and     paste   elsewhere
0000000    S   e   l   e   c   t           t   h   i   s
0000020    p   r   e   f   o   r   m   a   t   t   e   d
0000040    t   e   x   t                   a   n   d

Klipper displays the copied text slightly differently - it displays the text with each tab converted to a single space in its LMB menu. That might just be its handling for multiple spaces, though.
Comment 3 Jose Hernandez 2004-03-11 21:30:11 UTC
This is a huge problem when doing research and trying to get report data from statistics websites into spreadsheets.
Comment 4 George Goldberg 2008-04-06 08:42:29 UTC
confirmed in svn trunk r793457.
Comment 5 groot 2009-07-08 17:59:09 UTC
Not FreeBSD specific. Still in 4.3 rc1.
Comment 6 Samuel Brack 2010-12-29 16:11:10 UTC
Still an issue in 4.5.4 - confirmed.
Comment 7 Justin Zobel 2021-03-21 00:25:39 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 8 groot 2021-03-21 01:06:33 UTC
I just checked with Konqueror and Falkon from whatever is current, on FreeBSD, both paste to konsole and kate with correct tabs (the comment about klipper's display remains, though). Closing as "fixed some time in the past 10 years".