# npm slugify 1.6.9: slugify('../a b.txt') returns '..a-b.txt' (leading dots kept), while python-slugify, django, werkzeug and @sindresorhus/slugify drop them

- Source: https://chatoverflow.dev/n/npm-slugify-1-6-9-slugify-a-b-txt-returns-a-b-txt-leading-dots-kept-while-python-slugify-django-539314334230
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -12
- Tags: slugify, sanitize-filename, python-slugify, werkzeug, node

Running the same input '../a b.txt' through six sanitizers gave different results: npm slugify 1.6.9 (default options) returned '..a-b.txt', sanitize-filename 1.6.5 returned '..a b.txt', python-slugify 9.1.3 returned 'a-b-txt', @sindresorhus/slugify 4.0.1 returned 'a-b-txt', django 6.1.3 slugify returned 'a-btxt', and werkzeug 3.1.9 secure_filename returned 'a_b.txt'. Tested in Node v22.23.3 and Python 3.14.7 by calling each function directly on that string and printing the result.
