# CHANGELOG ## v1.0.17 (2026-10-24) - fix: use the default callback when `escapeHtml`, `onTag`, `onTagAttr`, `onIgnoreTag`, `onIgnoreTagAttr` or `safeAttrValue` is `null`, `undefined`, or not a function. An own function still overrides the default, and inherited properties are still ignored ([#304](https://github.com/leizongmin/js-xss/issues/304)). - fix: `filterXSSWithResult()` copies only own option properties, so a polluted prototype can no longer supply callbacks. - fix: treat `null` and `undefined` `whiteList` / `allowList` as unset. An explicit object, including `{}`, is still used. When `whiteList` is unset, `allowList` is used; otherwise the default whitelist is used. ## v1.0.16 (2026-10-20) - fix: reject unsafe URL schemes in `action` and `formaction` when allowed by a custom whitelist. Form destinations now allow only HTTP(S) and relative URLs; other schemes, including `javascript:`, `data:`, `mailto:`, `tel:` and FTP, are rejected. The default whitelist is unaffected. - [fix: ignore inherited properties when reading sanitizer options and whitelists to prevent prototype pollution from overriding filtering behavior](https://github.com/leizongmin/js-xss/pull/298) - feat: add `filterXSSWithResult()` to return sanitized HTML and records of ignored tags and attributes, with TypeScript declarations ([#297](https://github.com/leizongmin/js-xss/pull/297), [#299](https://github.com/leizongmin/js-xss/pull/299), [#300](https://github.com/leizongmin/js-xss/pull/300)). - [ci: update GitHub Actions and tested Node.js versions](https://github.com/leizongmin/js-xss/pull/296) ## v1.0.15 (2024-03-03) - [feat: add `` to default whitelist](https://github.com/leizongmin/js-xss/pull/279) by @rayrny - [feat: single-quoted attribute value syntax support](https://github.com/leizongmin/js-xss/pull/287) by @mdk000 ## v1.0.14 (2022-08-16) - [fix: problem with not closed tag](https://github.com/leizongmin/js-xss/pull/262) by @slawiko - [fix: add allowList to types](https://github.com/leizongmin/js-xss/pull/261) by @metonym ## v1.0.13 (2022-06-07) - [revert: fix: comment has encoded](https://github.com/leizongmin/js-xss/pull/257) ## v1.0.12 (2022-06-04) - [feat: add eslint:recommended check](https://github.com/leizongmin/js-xss/pull/252) by @lumburr - [fix: comment has encoded](https://github.com/leizongmin/js-xss/pull/257) by @lumburr - [fix: whitelist match failure due to case ignoring](https://github.com/leizongmin/js-xss/pull/256) by @lumburr - [fix: class is wrong separated by attributes in method onTagAttr](https://github.com/leizongmin/js-xss/pull/253) by @lumburr ## v1.0.11 (2022-03-06) - [feat: add support for allowList as an alias for whiteList](https://github.com/leizongmin/js-xss/pull/249) by @schu34 ## v1.0.10 (2021-10-08) - [Fix: #239 stripCommentTag DoS attack](https://github.com/leizongmin/js-xss/pull/239) ## v1.0.9 (2021-05-06) - [Fix whitespace bypass #218](https://github.com/leizongmin/js-xss/pull/218/files) by @TomAnthony - [Add `` to default whitelist #216](https://github.com/leizongmin/js-xss/pull/216) by @spacegaier - [Add `
` and `
` to default whitelist](https://github.com/leizongmin/js-xss/pull/220) by @daraz999 - Add `