sqlitebrowser
sqlitebrowser copied to clipboard
[Bug]: copy results in html data
What did you do?
I browsed a table or view, selected a cell and copied the data.
What did you expect to see?
I expected the clipboard to contain the text-only version of the data.
What did you see instead?
The clipboard contains html like:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><title></title><meta name="generator" content="DB Browser for SQLite"><meta name="date" content="YYYY-08-DDT20:15:22.721"><style type="text/css">br{mso-data-placement:same-cell;}</style></head><body>
E Books
--
</body></html>
and in some application, pasting results in br{mso-data-placement:same-cell;}E Books
.
DB4S Version
3.12.2
What OS are you seeing the problem on?
Linux
OS version
Debian Bullseye
Relevant log output
No response
Prevention against duplicate issues
- [X] I have searched for similar issues
In Windows, copying something copies it in several formats, and its up to the application when you click 'paste' which 'flavour' of whats on the clipboard is the most suitable format - in Notepad it'll be plain text, but in Excel it could be one or two cells. I've not seen this myself - copying data and the clipboard contains HTML. The date format doesn't even appear valid - "content="YYYY-08-DDT20:15:22.721">" - what data did you actually highlight and copy? Could you have a background process monitoring and tweaking the clipboard? I know in Windows, MS Office can play havok with the clipboard, grabbing it and Outlook grabbing it to try and identify meeting data, etc.
I am not on Windows, but on Chrome OS. The application is running in a Debian container. No background process that I am aware of. I am copying a text cell with the context menu, or ctrl-c.
I am not on Windows
No, I explained that poorly. What I meant was, "Windows does this - could your OS be doing something similar in that there are multiple items on the clipboard". Some applications (again, thinking of Windows) have a 'Paste special' where you can select which item on the clipboard you actually want to paste.
The date format in the HTML seems invalid, so what content did you expect to see - you put "text-only version of the data" but what did that look like? I assume a date?
If you copy other cells, do they also contain HTML? In the same 'corrupted' way? If you try another table? I'm wondering (clutching at straws) if the data is in one format, but the displayed format is another? Have you changed the display format of the column?
You might be right, thanks for the ideas. It really depends where I paste. The example I gave above is copied from a simple text field. When pasting in the address bar of the browser it looks normal. Pasting in this textarea gives the HTML. Pasting inside an Android application (I have also those on this machine) gives br{mso-data-placement:same-cell;}E Books
. No clue if you can do anything, close the issue if not.
I confirm we are including the data in several formats in the clipboard, and it should be up to the application where the data is pasted the most relevant to them, for example, a plain text editor will choose text/plain and a word processor will take and interpret the text/html data pasting rich text format. Some applications will let the user choose or have different keyboard shortcuts. This works on Linux and Windows, so I suppose the issue is with Qt on ChromeOS or ChromeOS itself.
I'll close the issue, as suggested, since there's nothing we can do to fix it, without loosing functionality on other platforms.