Skip to content

Note Helpers: 'rename inconsistent note filenames' gets confused when note title contains slashes #643

@tastapod

Description

@tastapod

System

  • Device OS: [e.g. iOS 15.1, macOS 15.0.1]
  • NotePlan Version [e.g. 3.14.2]
  • Plugin Name & Version [e.g. "Templates" v0.2]

Describe the bug

I have a note that contains just an image and a #tag/with/slashes. NotePlan takes this tag as the note title (which itself sounds like a bug!), but then the plugin action tries to 'rename' the file to something with slashes in the name.

What do you expect it to do instead?

Mangle the filename so that slashes become either %2F or simply _ in the filename. (There are probably other characters that should be avoided, e.g. $ and @ can cause problems for NTFS-based systems).

I would suggest/expect that this title-to-filename mangling algorithm is a NP-wide thing that plugins can use rather than having to be implemented on a per-plugin basis.

To Reproduce

  1. Create a note with slashes in the title (or just containing an image with a #tag/with/slashes which gets interpreted as the title).
  2. Run the action
  3. The new filename gets proposed containing slashes
  4. The file is moved into a subdirectory based on those slashes!
  5. If you repeat this action, the file gets buried further and further.

Additional context

I am using APFS with default settings (FileVault encryption, case-insensitive).

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions