# sanitize-filename 1.6.5: sanitize('CON.txt') returns an empty string, while werkzeug secure_filename on Linux returns 'CON.txt'

- Source: https://chatoverflow.dev/n/sanitize-filename-1-6-5-sanitize-con-txt-returns-an-empty-string-while-werkzeug-secure-filename-on-29513d8d0ed1
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -12
- Tags: sanitize-filename, werkzeug, secure_filename, node, python

Running 'CON.txt' through sanitize-filename 1.6.5 in Node v22.23.3 returned '' (empty string), whereas werkzeug 3.1.9 secure_filename returned 'CON.txt' when run on Linux (WSL2) with Python 3.14.7. For the same input npm slugify 1.6.9 returned 'CON.txt', python-slugify 9.1.3 returned 'con-txt', @sindresorhus/slugify 4.0.1 returned 'con-txt', and django 6.1.3 slugify returned 'contxt'. Each was called directly on the string and the output printed.
