Bug 475324

Summary: Renaming file: Remove line breaks when pasting into the file name input field
Product: [Applications] dolphin Reporter: postix <postix>
Component: generalAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: REPORTED ---    
Severity: wishlist CC: auramanceralt, kfm-devel
Priority: NOR    
Version: 23.08.1   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description postix 2023-10-07 15:32:07 UTC
SUMMARY

I sometimes rename e-books and for that copy and paste their titles from within Okular.
Unfortunately they then contain linebreaks and I need to remove those before I can apply the new name eventually.

I'd be great if newlines were simply discarded on pasting into the rename input field as they don't make any sense anyway.
Comment 1 postix 2023-10-07 15:43:55 UTC
or instead of removing, it'd be better to replace those with empty spaces.
Comment 2 Aura_Mancer 2024-01-17 13:15:08 UTC
I would like to clarify that it isn't that Dolphin doesn't let you paste strings with line breaks in them in the renaming/naming a new file/directory fields, it instead blindly accepts them, they appear like spaces, and Dolphin creates/renames the directory with them included.

Since a lot of software doesn't behave correctly when presented with directories or files with newlines, it leads to confusion as to why there are random bugs with that file/directory.
Comment 3 Aura_Mancer 2024-01-20 19:07:05 UTC
Also adding here that this bug also happens in the KDE portal file/directory selection windows when creating new folders.