Bug 501303 - Strip out newlines and other control/special characters when pasting a filename from clipboard
Summary: Strip out newlines and other control/special characters when pasting a filena...
Status: RESOLVED DUPLICATE of bug 444747
Alias: None
Product: dolphin
Classification: Applications
Component: panels: folders (show other bugs)
Version: 24.12.2
Platform: Manjaro Linux
: NOR wishlist
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-03-10 15:26 UTC by Mohammed Khoory
Modified: 2025-03-11 04:41 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mohammed Khoory 2025-03-10 15:26:40 UTC
SUMMARY
If you paste the text contents of the clipboard into dolphin when renaming a file, and the text contents contain newlines (and possibly other uncommon characters), Dolphin currently leaves those characters in. This is not a bug, but it is also most likely not the intended behaviour of the user, and tends to cause problems for the user further down the line. I would like to propose to have Dolphin remove those characters automatically after pasting. 

Discussion here:
https://discuss.kde.org/t/remove-newlines-when-pasting-a-filename-from-clipboard-in-dolphin-while-renaming-a-file/31017?u=9man

STEPS TO REPRODUCE
1. Copy a string of text that contains newlines
2. In dolphin, select a file, right click and rename
3. Paste the string of text

OBSERVED RESULT
The new filename contains newlines.

EXPECTED RESULT
The new filename should contain the string without newlines or other control characters

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Linux 6.6.80-1-MANJARO 
KDE Plasma Version: 6.3.2
KDE Frameworks Version: 6.11.0
Qt Version: 6.8.2
Comment 1 fanzhuyifan 2025-03-11 04:41:16 UTC
*** This bug has been marked as a duplicate of bug 444747 ***