Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sanitize "." in sanitizedPaths #403

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Commits on Dec 12, 2021

  1. Simplify sanitizePath

    Problem:
    If the title of an entry contains a ".", the path becomes invalid.
    
    Solution:
    Removing all "."s in the path using slugify resolves this problem.
    
    Furthermore the following changes got made to simplify the code of sanitizePath:
    - Slugify automatically removes leading, trailing or doubled replacement chars, so doing it explicitly is just a no-op.
    - Also slugify has an option for converting to lower case.
    Snapstromegon committed Dec 12, 2021
    Configuration menu
    Copy the full SHA
    c71975c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    28f92cf View commit details
    Browse the repository at this point in the history
  3. fix: resolve prettier warning

    Signed-off-by: Raphael Höser <[email protected]>
    Snapstromegon committed Dec 12, 2021
    Configuration menu
    Copy the full SHA
    6819582 View commit details
    Browse the repository at this point in the history
  4. fix(unittest): dots get removed, not replaced

    Signed-off-by: Raphael Höser <[email protected]>
    Snapstromegon committed Dec 12, 2021
    Configuration menu
    Copy the full SHA
    e794b4a View commit details
    Browse the repository at this point in the history
  5. fix(sanitizePath): if you set slugify.remove, it doesn't remove the d…

    …efault char set
    
    Change the bahavior to replace dots instead of removing them
    
    Signed-off-by: Raphael Höser <[email protected]>
    Snapstromegon committed Dec 12, 2021
    Configuration menu
    Copy the full SHA
    e4f1cec View commit details
    Browse the repository at this point in the history

Commits on Dec 13, 2021

  1. fix(node12) node 12 doesn't support replaceAll yet

    My solution was using replaceAll, but that isn't supported in node 12.
    Therefore I switched to regex for this.
    Snapstromegon authored Dec 13, 2021
    Configuration menu
    Copy the full SHA
    d18c854 View commit details
    Browse the repository at this point in the history