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
> var Filter = require('bad-words'),
... filter = new Filter();
undefined
> filter.clean("שלום עליכם");
produces:
Uncaught TypeError: Cannot read properties of null (reading '0')
at Filter.clean (/Users/julian/Development/library-api-v2/node_modules/.pnpm/[email protected]/node_modules/bad-words/lib/badwords.js:58:41)
where what's happening is ultimately that the \b JS regex isn't very happy with non-ASCII boundaries.
I know this library seems essentially to be for English/ASCII but perhaps it's worth considering either producing a more explicit error or perhaps returning non-ASCII input unchanged.
The text was updated successfully, but these errors were encountered:
Running:
produces:
where what's happening is ultimately that the
\b
JS regex isn't very happy with non-ASCII boundaries.I know this library seems essentially to be for English/ASCII but perhaps it's worth considering either producing a more explicit error or perhaps returning non-ASCII input unchanged.
The text was updated successfully, but these errors were encountered: