Bug 414991 - Copy from Chromium/Firefox and Paste into Kate with formatted text results in added symbols
Summary: Copy from Chromium/Firefox and Paste into Kate with formatted text results in...
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-12-09 19:02 UTC by Marcus Seyfarth
Modified: 2021-07-04 20:33 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Screenshot 1 (187.11 KB, image/png)
2019-12-09 19:02 UTC, Marcus Seyfarth
Details
Screenshot 2 (66.96 KB, image/png)
2019-12-09 19:03 UTC, Marcus Seyfarth
Details
Chrome 86.0.4240.193 (86.31 KB, image/png)
2020-11-13 11:56 UTC, Marcus Seyfarth
Details
Firefox 82.0.3 (89.58 KB, image/png)
2020-11-13 11:57 UTC, Marcus Seyfarth
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marcus Seyfarth 2019-12-09 19:02:03 UTC
Created attachment 124402 [details]
Screenshot 1

SUMMARY

In my workflow I use compilation flags saved in a GMail mail and copy them into Makefiles which I open with Kate. A copy out of Chromium/Firefox and paste into Kate with formatted text results in an added symbol around the once formatted text which confuses the compiler and should not be there. This bug was introduced around late summer/early fall this year - it used to work as expected before. 

STEPS TO REPRODUCE
Copy a text with different formatting from Firefox or Chromium into Kate (see Screenshot 2)

OBSERVED RESULT
There is a trailing symbol at once formatted text (see Screenshot 1).

EXPECTED RESULT
There should be no such added symbol in Kate.

SOFTWARE/OS VERSIONS
openSUSE Tumbleweed from 4th December 2019

Linux/KDE Plasma: 
KDE Plasma Version: 5.17.3
KDE Frameworks Version: 5.64.0
Qt Version: 5.13.1
Comment 1 Marcus Seyfarth 2019-12-09 19:03:25 UTC
Created attachment 124403 [details]
Screenshot 2

Gmail source document
Comment 2 Marcus Seyfarth 2020-01-02 17:21:36 UTC
Further testing revealed that this might not be a KDE specific issue as I recently tested Clear Linux which uses GNOME and observed similar erratic behaviour while pasting the same snippet into their text editor - even worse, there are no visible indicators (such as the added symbol in KATE) that anything is wrong, but it simply errors out during compilation.
Comment 3 Justin Zobel 2020-10-30 00:49:50 UTC
Marcus can you confirm if this is still an issue. Without the original email with symbols in it, it would be hard to test and diagnose this issue.
Comment 4 Marcus Seyfarth 2020-11-11 15:11:21 UTC
Just for reference, I've sent two mails with examples to Justin privately to replicate the issue. It was still reproducible for me with a recent 5.9.3 kernel on Manajaro 20.2 pre-testing3.
Comment 5 Justin Zobel 2020-11-11 22:33:54 UTC
(In reply to Marcus Seyfarth from comment #4)
> Just for reference, I've sent two mails with examples to Justin privately to
> replicate the issue. It was still reproducible for me with a recent 5.9.3
> kernel on Manajaro 20.2 pre-testing3.

I got these thanks Marcus. Aiming to have a look into this soon.
Comment 6 Justin Zobel 2020-11-13 06:25:06 UTC
Tested this in Kate and I cannot replicate the issue, have emailed Marcus for further information.
Comment 7 Marcus Seyfarth 2020-11-13 11:18:26 UTC
I've just send you two e-Mails detailing the issue further. 

I've made a discovery though, if I copy & paste the text from a send E-Mail it won't reproduce. I can only reproduce it when the text is copy & pasted from a draft mail. 

That makes it harder to get you to reproduce the issue though. :(
Comment 8 Marcus Seyfarth 2020-11-13 11:38:16 UTC
Hm, I've tried to reproduce the problem with new snippets from stackoverflow, where I copy the formatted compiler options first into a Gmail draft and then from Gmail into Kate. But I cannot reproduce the issue anymore. Also directly copying the snippet from stackoverflow to Kate won't reproduce it. 

Maybe my old draft document inherited the issue and preserved it for as long as I used it.

If you can't reproduce it either, I'll close the issue.
Comment 9 Marcus Seyfarth 2020-11-13 11:44:59 UTC
Okay, one last try:

Step 1: Open the following page: https://stackoverflow.com/questions/28875325/gcc-optimization-flag-o3-makes-code-slower-than-o2

Step 2: Copy all the paragraphs from the comments below the top post, beginning with: "Did you run each program once?"

Step 3: Paste these in a GMail draft mail.

Step 4: Copy the text from the draft mail and open KATE

Step 5: Paste the text into KATE

--> I get these trailing _ again.

I won't get them if I directly copy & paste all these comments from the Website into Kate.
Comment 10 Marcus Seyfarth 2020-11-13 11:56:17 UTC
Created attachment 133295 [details]
Chrome 86.0.4240.193

Chrome version used: 86.0.4240.193
Comment 11 Marcus Seyfarth 2020-11-13 11:57:48 UTC
Created attachment 133296 [details]
Firefox 82.0.3

Firefox 82.0.3
Comment 12 Marcus Seyfarth 2020-11-13 12:06:03 UTC
My analysis: Firefox shows the issue to a far lesser extent than Chromium (just look at the trails around "halex" in each screenshot), but both browsers reproduce the issue when using a Gmail draft mail as an intermediate step.
Comment 13 Marcus Seyfarth 2021-07-04 20:33:01 UTC
Good news, a recent update fixed the issue for me. I cannot tell where exactly in the stack the issue got fixed, but I am happy that it is gone now.