@wpe-tkpd/xss
Advanced tools
Comparing version 4.6.0 to 4.7.0
@@ -1,2 +0,4 @@ | ||
export default function sanitizeUrl(url: string | undefined, fallback?: string): string; | ||
declare type Url = string | URL; | ||
export default function sanitizeUrl(url: Url | undefined, fallback?: Url): string; | ||
export {}; | ||
//# sourceMappingURL=sanitizeUrl.d.ts.map |
@@ -11,3 +11,3 @@ "use strict"; | ||
function sanitizeUrl(url, fallback) { | ||
var trustedUrl = (0, _sanitizeUrl.sanitizeUrl)(url); | ||
var trustedUrl = (0, _sanitizeUrl.sanitizeUrl)(url instanceof URL ? url.toString() : url); | ||
@@ -20,3 +20,4 @@ if (trustedUrl === 'about:blank') { | ||
if (fallback) { | ||
return (0, _sanitizeUrl.sanitizeUrl)(fallback); | ||
var fallbackUrl = (0, _sanitizeUrl.sanitizeUrl)(fallback instanceof URL ? fallback.toString() : fallback); | ||
return fallbackUrl; | ||
} | ||
@@ -23,0 +24,0 @@ } |
{ | ||
"name": "@wpe-tkpd/xss", | ||
"version": "4.6.0", | ||
"version": "4.7.0", | ||
"description": "Various sanitizer, escaper, encoder, and utilities to prevent XSS", | ||
@@ -5,0 +5,0 @@ "sideEffects": false, |
Sorry, the diff of this file is not supported yet
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license
Found 1 instance in 1 package
No License Found
License(Experimental) License information could not be found
Found 1 instance in 1 package
22231
343
80