Skip to content

{{title}} does not work in setting "Note creation file path" when special characters are in the title #99

Closed

Description

@SeLiEnisyst

Hi,

this podcast: https://feeds.lagedernation.org/feeds/ldn-mp3.xml, with title

Spezial: Wie kommt Deutschland aus der Krise? (Rüdiger Bachmann, Ökonom)

did not work.

... same in the download-settings ...

Activity

  1. NewAiCoder commented on Jul 10, 2024

    @NewAiCoder

    Having the same issue, even though the documentation indicates that {{title}} used in the file path section should automatically remove all special characters:
    https://podnotes.obsidian.guide/templates/

  2. Przeswit commented on Jul 27, 2024

    @Przeswit

    I'm bumping this topic - my situation looks very similar. According to the documentation, special characters in the podcast title should be automatically removed - but they aren't. As a result, whenever an episode title contains, for example, a question mark, the "create note" function only generates a message saying "Failed to create note: ..."

  3. chhoumann commented on Jun 14, 2026

    @chhoumann
    Owner

    Thanks for the reports, and apologies for the long delay here.

    This is fixed as of v2.13.4 (current release is 2.16.0). If you're on 2.13.4 or newer, {{title}} in the Note creation file path setting now strips all filesystem-illegal characters and your example episode creates a note successfully.

    Root cause

    At the time this was filed (June 2024), {{title}} in the file-path setting was already being sanitized, but the illegal-character regex did not include ?. The reported episode title —

    Spezial: Wie kommt Deutschland aus der Krise? (Rüdiger Bachmann, Ökonom)

    — had its : and , stripped, but the ? survived. A ? is illegal in filenames on Windows and Android, so app.vault.create rejected it and you got "Failed to create note". That's also why the behavior didn't match the docs, which said special characters are removed.

    The fix

    Commit 371184f ("fix: replace '?' in file names with empty string", 2025-01-19) added ? to the sanitizer regex (src/TemplateEngine.ts, replaceIllegalFileNameCharactersInString). It now removes all nine OS/Obsidian-illegal filename characters: * " \ / < > : | ?.

    Verification

    Running the exact title from this issue through the current sanitizer and app.vault.create in a real Obsidian vault produces:

    Spezial Wie kommt Deutschland aus der Krise (Rüdiger Bachmann Ökonom).md
    

    …and the note is created without error. (umlauts and parentheses are legal in filenames, so they're preserved.)

    Note on related edge cases (not this bug)

    A couple of separate situations can still cause a create failure, but they are not the special-character problem reported here:

    • Very long titles (e.g. ~300 chars) can hit the OS path-length limit (ENAMETOOLONG). That's tracked in [BUG] Handling of max path length when creating notes #22.
    • A title made up entirely of illegal characters would sanitize to an empty name. That's a latent edge case, distinct from this report.

    Closing as fixed — please reopen (or open a fresh issue) if you still see this on v2.13.4+ and include the episode title and your file-path setting. 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions