[kate] [Bug 410951] Pasting text from Firefox adds bogus whitespace characters at the end of every line / sanitize pasted text

2019-08-25 Thread Christoph Cullmann
https://bugs.kde.org/show_bug.cgi?id=410951

--- Comment #19 from Christoph Cullmann  ---
No problem, should have thought of Windows line endings a long time ago ;=)

-- 
You are receiving this mail because:
You are watching all bug changes.

[kate] [Bug 410951] Pasting text from Firefox adds bogus whitespace characters at the end of every line / sanitize pasted text

2019-08-25 Thread Nate Graham
https://bugs.kde.org/show_bug.cgi?id=410951

--- Comment #18 from Nate Graham  ---
You fixed it! Yay!

-- 
You are receiving this mail because:
You are watching all bug changes.

[kate] [Bug 410951] Pasting text from Firefox adds bogus whitespace characters at the end of every line / sanitize pasted text

2019-08-25 Thread Nate Graham
https://bugs.kde.org/show_bug.cgi?id=410951

Nate Graham  changed:

   What|Removed |Added

   Version Fixed In||5.62

-- 
You are receiving this mail because:
You are watching all bug changes.

[kate] [Bug 410951] Pasting text from Firefox adds bogus whitespace characters at the end of every line / sanitize pasted text

2019-08-25 Thread Christoph Cullmann
https://bugs.kde.org/show_bug.cgi?id=410951

--- Comment #17 from Christoph Cullmann  ---
Please try my patch.
No idea why Firefox should start to emit Windows \r\n line endings, but that
seems fixable.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kate] [Bug 410951] Pasting text from Firefox adds bogus whitespace characters at the end of every line / sanitize pasted text

2019-08-25 Thread Christoph Cullmann
https://bugs.kde.org/show_bug.cgi?id=410951

Christoph Cullmann  changed:

   What|Removed |Added

 Status|REPORTED|RESOLVED
 Resolution|--- |FIXED
  Latest Commit||https://commits.kde.org/kte
   ||xteditor/e487a184bc6f31f3f0
   ||e6ab538cb3406ec282a6d5

--- Comment #16 from Christoph Cullmann  ---
Git commit e487a184bc6f31f3f0e6ab538cb3406ec282a6d5 by Christoph Cullmann.
Committed on 25/08/2019 at 15:26.
Pushed by cullmann into branch 'master'.

try to sanitize line endings on paste

M  +10   -7src/document/katedocument.cpp

https://commits.kde.org/ktexteditor/e487a184bc6f31f3f0e6ab538cb3406ec282a6d5

-- 
You are receiving this mail because:
You are watching all bug changes.

[kate] [Bug 410951] Pasting text from Firefox adds bogus whitespace characters at the end of every line / sanitize pasted text

2019-08-25 Thread Christoph Cullmann
https://bugs.kde.org/show_bug.cgi?id=410951

--- Comment #15 from Christoph Cullmann  ---
Ok, then this can be fixed ;)

-- 
You are receiving this mail because:
You are watching all bug changes.

[kate] [Bug 410951] Pasting text from Firefox adds bogus whitespace characters at the end of every line / sanitize pasted text

2019-08-25 Thread Nate Graham
https://bugs.kde.org/show_bug.cgi?id=410951

--- Comment #14 from Nate Graham  ---
Okteta says the character is 0D (sorry if this is wrong or totally ignorant; I
have no idea what I'm doing in a hex editor).

-- 
You are receiving this mail because:
You are watching all bug changes.

[kate] [Bug 410951] Pasting text from Firefox adds bogus whitespace characters at the end of every line / sanitize pasted text

2019-08-25 Thread Christoph Cullmann
https://bugs.kde.org/show_bug.cgi?id=410951

--- Comment #13 from Christoph Cullmann  ---
One question I have: what is the character code of the added space? You get it
by e.g. saving and opening the file in okteta.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kate] [Bug 410951] Pasting text from Firefox adds bogus whitespace characters at the end of every line / sanitize pasted text

2019-08-25 Thread Christoph Cullmann
https://bugs.kde.org/show_bug.cgi?id=410951

--- Comment #12 from Christoph Cullmann  ---
I just checked our code once more, we do:

void KTextEditor::ViewPrivate::paste(const QString *textToPaste)
{
m_temporaryAutomaticInvocationDisabled = true;
doc()->paste(this, textToPaste ? *textToPaste :
QApplication::clipboard()->text(QClipboard::Clipboard));
m_temporaryAutomaticInvocationDisabled = false;
}

If Firefox messes up the text we get there, I am not aware of any fix that will
not anger other people that want the text to be 1:1 pasted.

I tend to close this as not a bug.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kate] [Bug 410951] Pasting text from Firefox adds bogus whitespace characters at the end of every line / sanitize pasted text

2019-08-24 Thread Nate Graham
https://bugs.kde.org/show_bug.cgi?id=410951

--- Comment #11 from Nate Graham  ---
I have no doubt that Firefox introduced the problem. I was just thinking that
maybe Kate could correct for it because apparently Gedit does.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kate] [Bug 410951] Pasting text from Firefox adds bogus whitespace characters at the end of every line / sanitize pasted text

2019-08-24 Thread Christoph Cullmann
https://bugs.kde.org/show_bug.cgi?id=410951

--- Comment #10 from Christoph Cullmann  ---
Hmm, I would like to help you there, but I can't see how we would introduce
such characters, as (if I don't misread our code) we just take 1:1 the stuff we
get from the Qt clipboard/paste buffer.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kate] [Bug 410951] Pasting text from Firefox adds bogus whitespace characters at the end of every line / sanitize pasted text

2019-08-15 Thread Eike Hein
https://bugs.kde.org/show_bug.cgi?id=410951

--- Comment #9 from Eike Hein  ---
I've had a similar problem the other day. I was copying some text from KDE's
Etherpad (notes.kde.org), specifically bullet point lists, to Kate and adding
`",` at the end and using block insert mode to add `"` and some indentation in
the front. Then I copied it into KDevelop. I was turning Etherpad bullets into
a QML string list, basically.

Somewhere in this chain of events, some of the lines ended up with
whitespace/newlines in front of the closing `"` that would get written out to
disk, but not shown in the UI. I had to reload with F5 to see it and be able to
remove it.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kate] [Bug 410951] Pasting text from Firefox adds bogus whitespace characters at the end of every line / sanitize pasted text

2019-08-15 Thread Christoph Cullmann
https://bugs.kde.org/show_bug.cgi?id=410951

--- Comment #8 from Christoph Cullmann  ---
Hmm, then I am confused :(
We didn't alter the copy & paste code in ages and I am not sure what should
have been broken there.
To sanitize stuff on paste is no good idea, that can silently remove spaces
your really "need", e.g. if you copy complex shell commands/code fragments.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kate] [Bug 410951] Pasting text from Firefox adds bogus whitespace characters at the end of every line / sanitize pasted text

2019-08-15 Thread Nate Graham
https://bugs.kde.org/show_bug.cgi?id=410951

--- Comment #7 from Nate Graham  ---
Yeah my Qt is 5.13 as well.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kate] [Bug 410951] Pasting text from Firefox adds bogus whitespace characters at the end of every line / sanitize pasted text

2019-08-15 Thread Christoph Cullmann
https://bugs.kde.org/show_bug.cgi?id=410951

--- Comment #6 from Christoph Cullmann  ---
Hmm, I did the same, didn't have issues.

My versions:

KDE Frameworks 5.62.0
Qt 5.13.0 (built against 5.13.0)

Frameworks is from master via kdesrc-build
Kate, too.
Qt is from archlinux

-- 
You are receiving this mail because:
You are watching all bug changes.

[kate] [Bug 410951] Pasting text from Firefox adds bogus whitespace characters at the end of every line / sanitize pasted text

2019-08-15 Thread Nate Graham
https://bugs.kde.org/show_bug.cgi?id=410951

--- Comment #5 from Nate Graham  ---
Created attachment 122148
  --> https://bugs.kde.org/attachment.cgi?id=122148=edit
Screen recording

Here's a screen recording.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kate] [Bug 410951] Pasting text from Firefox adds bogus whitespace characters at the end of every line / sanitize pasted text

2019-08-15 Thread Christoph Cullmann
https://bugs.kde.org/show_bug.cgi?id=410951

--- Comment #4 from Christoph Cullmann  ---
I copied the "News" column and I just get

News

KDE Applications 19.08 Brings New Features to Konsole, Dolphin, Kdenlive,
Okular and Dozens of Other Apps
Trusted IT Consulting Firms Directory Provides Businesses with KDE Support
The Linux Application Summit is coming to Barcelona in November
enioka Haute Couture Becomes a KDE Patron
Powered by Plasma: ALBA Synchrotron in Barcelona, Spain
Akademy 2019: Talk Schedule is out!
Plasma + Usability  Productivity Sprint in Valencia, Spain
Plasma 5.16 by KDE is Now Available
Announcing Our Google Summer of Code 2019 Students
Akademy 2019 registration now open

(exactly as here in bugzilla visible, with no stray spaces at the end)

-- 
You are receiving this mail because:
You are watching all bug changes.

[kate] [Bug 410951] Pasting text from Firefox adds bogus whitespace characters at the end of every line / sanitize pasted text

2019-08-15 Thread Nate Graham
https://bugs.kde.org/show_bug.cgi?id=410951

--- Comment #3 from Nate Graham  ---
For me, it's any text on any web page in Firefox. Any of the text on kde.org
should suffice for testing purposes.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kate] [Bug 410951] Pasting text from Firefox adds bogus whitespace characters at the end of every line / sanitize pasted text

2019-08-15 Thread Christoph Cullmann
https://bugs.kde.org/show_bug.cgi?id=410951

--- Comment #2 from Christoph Cullmann  ---
Which text do I need to copy and paste exactly?

-- 
You are receiving this mail because:
You are watching all bug changes.

[kate] [Bug 410951] Pasting text from Firefox adds bogus whitespace characters at the end of every line / sanitize pasted text

2019-08-15 Thread Christoph Cullmann
https://bugs.kde.org/show_bug.cgi?id=410951

Christoph Cullmann  changed:

   What|Removed |Added

 CC||cullm...@kde.org

--- Comment #1 from Christoph Cullmann  ---
Hmm, I pasted stuff into Kate and got new strange whitespaces.

Using Firefox 68.0.1

-- 
You are receiving this mail because:
You are watching all bug changes.

[kate] [Bug 410951] Pasting text from Firefox adds bogus whitespace characters at the end of every line / sanitize pasted text

2019-08-15 Thread Eike Hein
https://bugs.kde.org/show_bug.cgi?id=410951

Eike Hein  changed:

   What|Removed |Added

 CC||h...@kde.org

-- 
You are receiving this mail because:
You are watching all bug changes.