SUMMARY Demonstrative video: https://youtu.be/sBl0kbedNi0 If I copy text that contains file:///..." the text doesn't paste into sticky notes. The ellipsis can be swapped with any text and the trailing " must be there STEPS TO REPRODUCE 1. Copy text that contains file:///..." 2. Try to paste it to a sticky note OBSERVED RESULT Text doesn't paste EXPECTED RESULT Text should get pasted SOFTWARE/OS VERSIONS Operating System: Arch Linux KDE Plasma Version: 6.4.80 KDE Frameworks Version: 6.18.0 Qt Version: 6.10.0 Kernel Version: 6.16.0-arch1-1 (64-bit) Graphics Platform: Wayland Processors: 4 × Intel® Core™ i7-7600U CPU @ 2.80GHz Memory: 24 GiB of RAM (23.2 GiB usable) Graphics Processor: Intel® HD Graphics 620 Manufacturer: LENOVO Product Name: 20HG0003SG System Version: ThinkPad T470s
Wow, you're right. How odd!
With all the respect I believe this is the expected result. Widget auto detects links in copied text so they are formatted properly and can be opened (sic!). Since in URI standard quotation mark is treated as a special sign it must be percent encoded. Therefore proper file URI string will contain ```%22``` instead of ```"```. This work as intended if you use dolphin to copy file - simply copy the file you want a proper uri is available in clipboard so you can paste it wherever its needed including notes widget. It automatically percent-encode the text if needed. This applies to more then quotation mark sign. There whole bunch that need to be encoded. One can argue that invalid URIs should still be copied as they are without formatting but it also opens gate to other problems like: "hey, I paste file:// (or https:// or whatever) link and it is not recognized". Or if we treat such invalid text as link anyway then "Hey, I click on the link and it does not work". Therefore I see merits in current solution.
My use case here was that I was trying to paste arch install steps to my notepad so that I could quickly copy them back to the terminal. This was the line that I tried to paste: echo "Server = file:///srv/http" >> /etc/pacman.conf
(In reply to Antti Savolainen from comment #3) > My use case here was that I was trying to paste arch install steps to my > notepad so that I could quickly copy them back to the terminal. This was the > line that I tried to paste: > echo "Server = file:///srv/http" >> /etc/pacman.conf I've just tested it and it's indeed annoying when you copy large parts of text and some of it is simply dropped. What would work better is if underlying processor just left plain text as it is if link is not detected as valid. It is possible though to paste text from your example by choosing option "Paste with Full Formatting" from context menu. It's just not the default option under Ctrl+V shortcut.
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kdeplasma-addons/-/merge_requests/923
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kcoreaddons/-/merge_requests/535
Git commit 59e48d72bfd997a624549ed814397287cf095fea by Akseli Lahtinen. Committed on 03/10/2025 at 09:13. Pushed by akselmo into branch 'master'. KTextToHtml: If URL ends with double-quote, it's not valid URL In cases where URL does NOT start with double-quote, but ends with one, such as `file:///srv/http"`, mark the url as "badUrl". M +4 -0 autotests/ktexttohtmltest.cpp M +7 -0 src/lib/text/ktexttohtml.cpp https://invent.kde.org/frameworks/kcoreaddons/-/commit/59e48d72bfd997a624549ed814397287cf095fea