You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When a colon appears in the metadata referenced by the pattern property, it causes Metalsmith to crash at best, or hang indefinitely at worse, depending on the length of the processed metadata.
Whether colon is a valid dir char depends on the OS. In Linux, colons are valid directory chars.
It seems highly unlikely that anyone would want a colon in their destination path, especially in the case of a static site.
Therefore the most straightforward solution would be to strip it
…e sensible slugify defaults
This change sets more sensible slugify option defaults. As such it may result in different destination paths for existing builds.
To maintain compatibility, users should set slugify options to { lower: true, extend: {}, remove: /[^\w\s$*_+~.()'"!\-:@]+/g }.
Describe the bug
When a colon appears in the metadata referenced by the
pattern
property, it causes Metalsmith to crash at best, or hang indefinitely at worse, depending on the length of the processed metadata.Crash message example:
To Reproduce
Steps to reproduce the behavior:
npm install
node index
Expected behavior
Special characters in the permalink pattern metadata should be gracefully processed.
Environment
Additional context
The issue was introduced in v2.0.0.
The text was updated successfully, but these errors were encountered: