-
DevDependency Changes
- happy-dom to 15.11.6
-
Update (sub-)dependencies
- cross-spawn to 7.0.6
- micromatch to 4.0.8
- vite to 4.5.5
- Updated to handle back-slashes
- Updates get-func-name to 2.0.2
- Dependencies
- Update braces to 3.0.3
- Improve sanitization of whitespace escapes
- Improve sanitization of HTML entities
-
Move constant declarations from index file to
constants.ts
file -
Update to node v18
-
Dev Dependency Updates
- Update to TypeScript 5
- Other minor dependency updates
- Add additional null byte sanitization prior to html decoding (#48)
- Add null check to beginning of
sanitizeUrl
function (#54)
- Fix issue where urls in the form
https://example.com

/something
were not properly sanitized
- Fix issue where urls in the form
javascript:alert('xss');
were not properly sanitized - Fix issue where urls in the form
javasc	ript:alert('XSS');
were not properly sanitized
Breaking Changes
- Decode HTML characters automatically that would result in an XSS vulnerability when rendering links via a server rendered HTML file
// decodes to javacript:alert('XSS')
const vulnerableUrl =
"javascript:alert('XSS')";
sanitizeUrl(vulnerableUrl); // 'about:blank'
const okUrl = "https://example.com/" + vulnerableUrl;
// since the javascript bit is in the path instead of the protocol
// this is successfully sanitized
sanitizeUrl(okUrl); // 'https://example.com/javascript:alert('XSS');
- Fix issue where certain invisible white space characters were not being sanitized (#35)
- Fix issue where certain safe characters were being filtered out (#31 thanks @akirchmyer)
Breaking Changes
- Sanitize vbscript urls (thanks @vicnicius)
- Fixup path to type declaration (closes #25)
- Add typescript types
- Fix issue where urls with accented characters were incorrectly sanitized
Breaking Changes
- Protocol-less urls (ie: www.example.com) will be sanitised and passed on instead of sending out
about:blank
(Thanks @chawes13 #18)
- Trim whitespace from urls
breaking changes
- Replace blank strings with about:blank
- Replace null values with about:blank
- Allow relative urls to be sanitized
- Sanitize malicious URLs that begin with
\s
- Sanitize malicious URLs that begin with %20
- sanitize data: urls
- sanitize javascript: urls