url-sanitizer 2.0.11 → 2.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/url-sanitizer-wo-dompurify.min.js +1 -1
- package/dist/url-sanitizer-wo-dompurify.min.js.map +3 -3
- package/dist/url-sanitizer.min.js +3 -3
- package/dist/url-sanitizer.min.js.map +3 -3
- package/package.json +29 -23
- package/src/lib/iana/uri-schemes.json +1 -1
- package/src/mjs/file-reader.js +4 -8
- package/src/mjs/sanitizer.js +3 -3
- package/types/mjs/file-reader.d.ts +10 -10
- package/types/mjs/sanitizer.d.ts +37 -37
package/package.json
CHANGED
|
@@ -16,43 +16,49 @@
|
|
|
16
16
|
],
|
|
17
17
|
"type": "module",
|
|
18
18
|
"exports": {
|
|
19
|
-
"
|
|
20
|
-
"default": {
|
|
19
|
+
".": {
|
|
21
20
|
"types": "./types/index.d.ts",
|
|
21
|
+
"browser": "./dist/url-sanitizer-wo-dompurify.min.js",
|
|
22
22
|
"default": "./src/index.js"
|
|
23
|
-
}
|
|
23
|
+
},
|
|
24
|
+
"./package.json": "./package.json"
|
|
24
25
|
},
|
|
25
|
-
"types": "types/index.d.ts",
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"dompurify": "^3.
|
|
28
|
-
"jsdom": "^
|
|
27
|
+
"dompurify": "^3.4.2",
|
|
28
|
+
"jsdom": "^29.1.1"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@types/jsdom": "^28.0.
|
|
32
|
-
"@types/node": "^25.
|
|
31
|
+
"@types/jsdom": "^28.0.1",
|
|
32
|
+
"@types/node": "^25.6.2",
|
|
33
33
|
"c8": "^11.0.0",
|
|
34
34
|
"chai": "^6.2.2",
|
|
35
35
|
"commander": "^14.0.3",
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"eslint
|
|
39
|
-
"eslint-plugin-
|
|
40
|
-
"eslint-plugin-
|
|
41
|
-
"
|
|
36
|
+
"copyfiles-ng": "^2.4.7",
|
|
37
|
+
"esbuild": "^0.28.0",
|
|
38
|
+
"eslint": "^9.39.4",
|
|
39
|
+
"eslint-plugin-jsdoc": "^62.9.0",
|
|
40
|
+
"eslint-plugin-regexp": "^3.1.0",
|
|
41
|
+
"eslint-plugin-unicorn": "^64.0.0",
|
|
42
|
+
"globals": "^17.6.0",
|
|
42
43
|
"http-server": "^14.1.1",
|
|
43
44
|
"mocha": "^11.7.5",
|
|
44
|
-
"native-copyfiles": "^2.0.1",
|
|
45
45
|
"neostandard": "^0.13.0",
|
|
46
46
|
"npm-run-all2": "^8.0.4",
|
|
47
47
|
"papaparse": "^5.5.3",
|
|
48
|
-
"sinon": "^
|
|
49
|
-
"typescript": "^
|
|
50
|
-
"undici": "^
|
|
48
|
+
"sinon": "^22.0.0",
|
|
49
|
+
"typescript": "^6.0.3",
|
|
50
|
+
"undici": "^8.0.2"
|
|
51
51
|
},
|
|
52
52
|
"overrides": {
|
|
53
53
|
"c8": {
|
|
54
54
|
"yargs": "^18.0.0"
|
|
55
55
|
},
|
|
56
|
+
"eslint": {
|
|
57
|
+
"brace-expansion": "^1.1.13"
|
|
58
|
+
},
|
|
59
|
+
"mocha": {
|
|
60
|
+
"diff": "^8.0.3"
|
|
61
|
+
},
|
|
56
62
|
"serialize-javascript": "^7.0.4"
|
|
57
63
|
},
|
|
58
64
|
"scripts": {
|
|
@@ -62,15 +68,15 @@
|
|
|
62
68
|
"bundle:min-wo-dompurify": "esbuild --format=esm --platform=browser --outfile=dist/url-sanitizer-wo-dompurify.min.js --bundle --minify --sourcemap bundle_wo_dompurify/index.js",
|
|
63
69
|
"char": "node scripts/index char -i",
|
|
64
70
|
"copy": "npm-run-all -s copy:*",
|
|
65
|
-
"copy:src": "copyfiles src/**/* bundle --up=1 --verbose --exclude=src/mjs/dompurify.js --exclude=src/mjs/file-reader.js --exclude=src/mjs/lib-util.js",
|
|
66
|
-
"copy:src-wo-dompurify": "copyfiles src/**/* bundle_wo_dompurify --up=1 --verbose --exclude=src/mjs/dompurify.js --exclude=src/mjs/file-reader.js --exclude=src/mjs/lib-util.js",
|
|
67
|
-
"copy:repl": "copyfiles repl/dompurify.js repl/file-reader.js repl/lib-util.js bundle/mjs --up=1 --verbose",
|
|
68
|
-
"copy:repl-wo-dompurify": "copyfiles repl/dompurify-global.js repl/file-reader.js repl/lib-util.js bundle_wo_dompurify/mjs --up=1 --verbose && node scripts/index rename --oldpath=bundle_wo_dompurify/mjs/dompurify-global.js --newpath=bundle_wo_dompurify/mjs/dompurify.js -i",
|
|
71
|
+
"copy:src": "copyfiles-ng src/**/* bundle --up=1 --verbose --exclude=src/mjs/dompurify.js --exclude=src/mjs/file-reader.js --exclude=src/mjs/lib-util.js",
|
|
72
|
+
"copy:src-wo-dompurify": "copyfiles-ng src/**/* bundle_wo_dompurify --up=1 --verbose --exclude=src/mjs/dompurify.js --exclude=src/mjs/file-reader.js --exclude=src/mjs/lib-util.js",
|
|
73
|
+
"copy:repl": "copyfiles-ng repl/dompurify.js repl/file-reader.js repl/lib-util.js bundle/mjs --up=1 --verbose",
|
|
74
|
+
"copy:repl-wo-dompurify": "copyfiles-ng repl/dompurify-global.js repl/file-reader.js repl/lib-util.js bundle_wo_dompurify/mjs --up=1 --verbose && node scripts/index rename --oldpath=bundle_wo_dompurify/mjs/dompurify-global.js --newpath=bundle_wo_dompurify/mjs/dompurify.js -i",
|
|
69
75
|
"include": "node scripts/index include --dir=iana -i",
|
|
70
76
|
"lint": "eslint --fix .",
|
|
71
77
|
"test": "c8 --reporter=text mocha --exit test/*.test.js",
|
|
72
78
|
"test:bdd": "http-server ./ -c-1 -o test/bdd/url-sanitizer.test.html",
|
|
73
79
|
"tsc": "node scripts/index clean --dir=types -i && npx tsc"
|
|
74
80
|
},
|
|
75
|
-
"version": "2.0.
|
|
81
|
+
"version": "2.0.13"
|
|
76
82
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
["aaa","aaas","about","acap","acct","acd","acr","adiumxtra","adt","afp","afs","aim","amss","android","appdata","apt","ar","ari","ark","at","attachment","aw","barion","beshare","bitcoin","bitcoincash","bl","blob","bluetooth","bolo","brid","browserext","cabal","caip","calculator","callto","cap","cast","casts","chrome","chrome-extension","cid","coap","coaps","com-eventbrite-attendee","content","content-type","crid","cstr","cvs","dab","dat","data","dav","dhttp","diaspora","dict","did","dis","dlna-playcontainer","dlna-playsingle","dnp","dns","dntp","doi","donau","dpp","drm","dtmi","dtn","dvb","dvx","dweb","ed2k","eid","elsi","embedded","ens","esim","ethereum","example","facetime","feed","feedready","fido","file","finger","first-run-pen-experience","fish","fm","ftp","fuchsia-pkg","geo","gg","git","gitoid","gizmoproject","go","gopher","graph","gtalk","h323","ham","hcap","hcp","hs20","http","https","hxxp","hxxps","hydrazone","hyper","i0","iax","ibi","ibi-","icap","icon","ilstring","im","imap","info","iotdisco","ipfs","ipn","ipns","ipp","ipps","irc","irc6","ircs","iris","iris.beep","iris.lwz","iris.xpc","iris.xpcs","isostore","itms","jabber","jar","jms","keyparc","lastfm","lbry","ldap","ldaps","leaptofrogans","lid","linkid","lorawan","lpa","lvlt","machineProvisioningProgressReporter","magnet","mailto","maps","market","matrix","message","microsoft.windows.camera","microsoft.windows.camera.multipicker","microsoft.windows.camera.picker","mid","mms","mongodb","moz","moz-extension","mqtt","mqtts","ms-access","ms-appinstaller","ms-browser-extension","ms-calculator","ms-drive-to","ms-enrollment","ms-excel","ms-eyecontrolspeech","ms-gamebarservices","ms-gamingoverlay","ms-getoffice","ms-help","ms-infopath","ms-inputapp","ms-launchremotedesktop","ms-lockscreencomponent-config","ms-media-stream-id","ms-meetnow","ms-mixedrealitycapture","ms-mobileplans","ms-newsandinterests","ms-officeapp","ms-people","ms-personacard","ms-powerpoint","ms-project","ms-publisher","ms-recall","ms-remotedesktop","ms-remotedesktop-launch","ms-restoretabcompanion","ms-screenclip","ms-screensketch","ms-search","ms-search-repair","ms-secondary-screen-controller","ms-secondary-screen-setup","ms-settings","ms-settings-airplanemode","ms-settings-bluetooth","ms-settings-camera","ms-settings-cellular","ms-settings-cloudstorage","ms-settings-connectabledevices","ms-settings-displays-topology","ms-settings-emailandaccounts","ms-settings-language","ms-settings-location","ms-settings-lock","ms-settings-nfctransactions","ms-settings-notifications","ms-settings-power","ms-settings-privacy","ms-settings-proximity","ms-settings-screenrotation","ms-settings-wifi","ms-settings-workplace","ms-spd","ms-stickers","ms-sttoverlay","ms-transit-to","ms-useractivityset","ms-uup","ms-virtualtouchpad","ms-visio","ms-walk-to","ms-whiteboard","ms-whiteboard-cmd","ms-widgetboard","ms-widgets","ms-word","msnim","msrp","msrps","mss","mt","mtqp","mtrust","mumble","mupdate","mvn","mvrp","mvrps","news","nfs","ni","nih","nntp","notes","num","ocf","oid","onenote","onenote-cmd","opaquelocktoken","openid","openpgp4fpr","otpauth","palm","paparazzi","payto","pkcs11","platform","pop","pres","proxy","psyc","pttp","pwid","qb","query","quic-transport","redis","rediss","reload","res","resource","rmi","rsync","rtmfp","rtmp","rtsp","rtsps","rtspu","sarif","secondlife","secret-token","service","session","sftp","sgn","shc","shelter","sieve","simpleledger","simplex","sip","sips","skype","smb","smp","sms","smtp","snmp","soap.beep","soap.beeps","soldat","spacify","spiffe","spotify","ssb","ssh","starknet","steam","stun","stuns","submit","svn","swh","swid","swidpath","tag","taler","teamspeak","teapot","teapots","tel","teliaeid","telnet","tftp","things","thismessage","tip","tn3270","tool","turn","turns","tv","udp","unreal","upn","urn","ut2004","uuid-in-package","v-event","vemmi","ventrilo","ves","view-source","vnc","vscode","vscode-insiders","vsls","w3","wasm","wasm-js","wcr","web3","webcal","wifi","ws","wss","wtai","wyciwyg","xcompute","xcon","xcon-userid","xfire","xftp","xmlrpc.beep","xmlrpc.beeps","xmpp","xrcp","xri","ymsgr","z39.50r","z39.50s"]
|
|
1
|
+
["aaa","aaas","about","acap","acct","acd","acr","adiumxtra","adt","afp","afs","agtp","aim","amss","android","appdata","apt","ar","ari","ark","at","attachment","aw","barion","beshare","bitcoin","bitcoincash","bl","blob","bluetooth","bolo","brid","browserext","cabal","caip","calculator","callto","cap","cast","casts","chrome","chrome-extension","cid","coap","coaps","com-eventbrite-attendee","content","content-type","crid","cstr","cvs","dab","dat","data","dav","dhttp","diaspora","dict","did","dilithium3","dis","dlna-playcontainer","dlna-playsingle","dnp","dns","dntp","doi","donau","dpp","drm","dtmi","dtn","dvb","dvx","dweb","ed2k","eid","elsi","embedded","ens","esim","ethereum","example","facetime","feed","feedready","fido","file","finger","first-run-pen-experience","fish","fm","ftp","fuchsia-pkg","geo","gg","git","gitoid","gizmoproject","go","gopher","graph","gtalk","h323","ham","hcap","hcp","hs20","http","https","hxxp","hxxps","hydrazone","hyper","i0","iax","ibi","ibi-","icap","icon","ilstring","im","imap","info","iotdisco","ipfs","ipn","ipns","ipp","ipps","irc","irc6","ircs","iris","iris.beep","iris.lwz","iris.xpc","iris.xpcs","isostore","itms","jabber","jar","jms","keyparc","lastfm","lbry","ldap","ldaps","leaptofrogans","lid","linkid","lorawan","lpa","lvlt","machineProvisioningProgressReporter","magnet","mailto","maps","market","matrix","message","microsoft.windows.camera","microsoft.windows.camera.multipicker","microsoft.windows.camera.picker","mid","mms","mongodb","moz","moz-extension","mqtt","mqtts","ms-access","ms-appinstaller","ms-browser-extension","ms-calculator","ms-drive-to","ms-enrollment","ms-excel","ms-eyecontrolspeech","ms-gamebarservices","ms-gamingoverlay","ms-getoffice","ms-help","ms-infopath","ms-inputapp","ms-launchremotedesktop","ms-lockscreencomponent-config","ms-media-stream-id","ms-meetnow","ms-mixedrealitycapture","ms-mobileplans","ms-newsandinterests","ms-officeapp","ms-people","ms-personacard","ms-powerpoint","ms-project","ms-publisher","ms-recall","ms-remotedesktop","ms-remotedesktop-launch","ms-restoretabcompanion","ms-screenclip","ms-screensketch","ms-search","ms-search-repair","ms-secondary-screen-controller","ms-secondary-screen-setup","ms-settings","ms-settings-airplanemode","ms-settings-bluetooth","ms-settings-camera","ms-settings-cellular","ms-settings-cloudstorage","ms-settings-connectabledevices","ms-settings-displays-topology","ms-settings-emailandaccounts","ms-settings-language","ms-settings-location","ms-settings-lock","ms-settings-nfctransactions","ms-settings-notifications","ms-settings-power","ms-settings-privacy","ms-settings-proximity","ms-settings-screenrotation","ms-settings-wifi","ms-settings-workplace","ms-spd","ms-stickers","ms-sttoverlay","ms-transit-to","ms-useractivityset","ms-uup","ms-virtualtouchpad","ms-visio","ms-walk-to","ms-whiteboard","ms-whiteboard-cmd","ms-widgetboard","ms-widgets","ms-word","msnim","msrp","msrps","mss","mt","mtqp","mtrust","mumble","mupdate","mvn","mvrp","mvrps","news","nfs","ni","nih","nntp","notes","num","ocf","oid","onenote","onenote-cmd","opaquelocktoken","openid","openpgp4fpr","otpauth","palm","paparazzi","payto","pkcs11","platform","pop","pres","proxy","psyc","pttp","pwid","qb","query","quic-transport","redis","rediss","reload","res","resource","rmi","rsync","rtmfp","rtmp","rtsp","rtsps","rtspu","sarif","secondlife","secret-token","service","session","sftp","sgn","shc","shelter","sieve","simpleledger","simplex","sip","sips","skype","smb","smp","sms","smtp","snmp","soap.beep","soap.beeps","soldat","spacify","spiffe","spotify","ssb","ssh","starknet","steam","stun","stuns","submit","svn","swh","swid","swidpath","tag","taler","teamspeak","teapot","teapots","tel","teliaeid","telnet","tftp","things","thismessage","tip","tn3270","tool","turn","turns","tv","udp","unreal","upn","urn","ut2004","uuid-in-package","v-event","vemmi","ventrilo","ves","view-source","vnc","vscode","vscode-insiders","vsls","w3","wasm","wasm-js","wcr","web3","webcal","wifi","ws","wss","wtai","wyciwyg","xcompute","xcon","xcon-userid","xfire","xftp","xmlrpc.beep","xmlrpc.beeps","xmpp","xrcp","xri","ymsgr","z39.50r","z39.50s"]
|
package/src/mjs/file-reader.js
CHANGED
|
@@ -67,10 +67,10 @@ export class ProgressEvent extends Event {
|
|
|
67
67
|
*/
|
|
68
68
|
export class FileReader extends EventTarget {
|
|
69
69
|
/* private fields */
|
|
70
|
-
#error;
|
|
71
|
-
#state;
|
|
72
|
-
#result;
|
|
73
|
-
#terminate;
|
|
70
|
+
#error = null;
|
|
71
|
+
#state = EMPTY;
|
|
72
|
+
#result = null;
|
|
73
|
+
#terminate = false;
|
|
74
74
|
|
|
75
75
|
/**
|
|
76
76
|
* construct
|
|
@@ -80,10 +80,6 @@ export class FileReader extends EventTarget {
|
|
|
80
80
|
this.EMPTY = EMPTY;
|
|
81
81
|
this.LOADING = LOADING;
|
|
82
82
|
this.DONE = DONE;
|
|
83
|
-
this.#error = null;
|
|
84
|
-
this.#state = this.EMPTY;
|
|
85
|
-
this.#result = null;
|
|
86
|
-
this.#terminate = false;
|
|
87
83
|
}
|
|
88
84
|
|
|
89
85
|
/* getter */
|
package/src/mjs/sanitizer.js
CHANGED
|
@@ -39,10 +39,10 @@ import {
|
|
|
39
39
|
/**
|
|
40
40
|
* URL sanitizer
|
|
41
41
|
*/
|
|
42
|
-
|
|
42
|
+
class URLSanitizer extends URISchemes {
|
|
43
43
|
/* private fields */
|
|
44
44
|
#nest;
|
|
45
|
-
#recurse;
|
|
45
|
+
#recurse = new Set();
|
|
46
46
|
|
|
47
47
|
/**
|
|
48
48
|
* construct
|
|
@@ -50,7 +50,6 @@ export class URLSanitizer extends URISchemes {
|
|
|
50
50
|
constructor() {
|
|
51
51
|
super();
|
|
52
52
|
this.#nest = 0;
|
|
53
|
-
this.#recurse = new Set();
|
|
54
53
|
}
|
|
55
54
|
|
|
56
55
|
/**
|
|
@@ -364,6 +363,7 @@ export class URLSanitizer extends URISchemes {
|
|
|
364
363
|
this.#recurse.clear();
|
|
365
364
|
}
|
|
366
365
|
}
|
|
366
|
+
export { URLSanitizer };
|
|
367
367
|
|
|
368
368
|
/* aliases and async wrappers */
|
|
369
369
|
/* instance */
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
export class ProgressEvent extends Event {
|
|
2
2
|
constructor(type: string, opt?: {
|
|
3
|
-
bubbles?: boolean;
|
|
4
|
-
cancelable?: boolean;
|
|
5
|
-
composed?: boolean;
|
|
6
|
-
lengthComputable?: boolean;
|
|
7
|
-
loaded?: number;
|
|
8
|
-
total?: number;
|
|
3
|
+
bubbles?: boolean | undefined;
|
|
4
|
+
cancelable?: boolean | undefined;
|
|
5
|
+
composed?: boolean | undefined;
|
|
6
|
+
lengthComputable?: boolean | undefined;
|
|
7
|
+
loaded?: number | undefined;
|
|
8
|
+
total?: number | undefined;
|
|
9
9
|
});
|
|
10
10
|
get lengthComputable(): boolean;
|
|
11
|
-
get loaded(): number;
|
|
12
|
-
get total(): number;
|
|
11
|
+
get loaded(): number | undefined;
|
|
12
|
+
get total(): number | undefined;
|
|
13
13
|
#private;
|
|
14
14
|
}
|
|
15
15
|
export class FileReader extends EventTarget {
|
|
16
16
|
EMPTY: number;
|
|
17
17
|
LOADING: number;
|
|
18
18
|
DONE: number;
|
|
19
|
-
get error():
|
|
19
|
+
get error(): null;
|
|
20
20
|
get readyState(): number;
|
|
21
|
-
get result():
|
|
21
|
+
get result(): null;
|
|
22
22
|
_dispatchProgressEvent(type: string): boolean;
|
|
23
23
|
abort(): void;
|
|
24
24
|
_read(blob: object, format: string, encoding?: string): Promise<void>;
|
package/types/mjs/sanitizer.d.ts
CHANGED
|
@@ -1,27 +1,12 @@
|
|
|
1
|
-
export class URLSanitizer extends URISchemes {
|
|
2
|
-
replace(data: string): string;
|
|
3
|
-
purify(dom: string): string;
|
|
4
|
-
sanitize(url: string, opt?: {
|
|
5
|
-
allow?: Array<string>;
|
|
6
|
-
deny?: Array<string>;
|
|
7
|
-
only?: Array<string>;
|
|
8
|
-
}): string | null;
|
|
9
|
-
parse(url: string, opt?: {
|
|
10
|
-
allow?: Array<string>;
|
|
11
|
-
deny?: Array<string>;
|
|
12
|
-
only?: Array<string>;
|
|
13
|
-
}): ParsedURL;
|
|
14
|
-
#private;
|
|
15
|
-
}
|
|
16
1
|
export function sanitizeURL(url: string, opt?: {
|
|
17
|
-
allow?:
|
|
18
|
-
deny?:
|
|
19
|
-
only?:
|
|
2
|
+
allow?: string[] | undefined;
|
|
3
|
+
deny?: string[] | undefined;
|
|
4
|
+
only?: string[] | undefined;
|
|
20
5
|
}): Promise<string | null>;
|
|
21
6
|
export function sanitizeURLSync(url: string, opt?: {
|
|
22
|
-
allow?:
|
|
23
|
-
deny?:
|
|
24
|
-
only?:
|
|
7
|
+
allow?: string[] | undefined;
|
|
8
|
+
deny?: string[] | undefined;
|
|
9
|
+
only?: string[] | undefined;
|
|
25
10
|
}): string | null;
|
|
26
11
|
export function parseURL(url: string): Promise<ParsedURL>;
|
|
27
12
|
export function parseURLSync(url: string): ParsedURL;
|
|
@@ -32,21 +17,36 @@ export type ParsedURL = {
|
|
|
32
17
|
input: string;
|
|
33
18
|
valid: boolean;
|
|
34
19
|
data?: {
|
|
35
|
-
mime?: string;
|
|
36
|
-
base64?: boolean;
|
|
37
|
-
data?: string;
|
|
38
|
-
};
|
|
39
|
-
href?: string;
|
|
40
|
-
origin?: string;
|
|
41
|
-
protocol?: string;
|
|
42
|
-
username?: string;
|
|
43
|
-
password?: string;
|
|
44
|
-
host?: string;
|
|
45
|
-
hostname?: string;
|
|
46
|
-
port?: string;
|
|
47
|
-
pathname?: string;
|
|
48
|
-
search?: string;
|
|
49
|
-
hash?: string;
|
|
20
|
+
mime?: string | undefined;
|
|
21
|
+
base64?: boolean | undefined;
|
|
22
|
+
data?: string | undefined;
|
|
23
|
+
} | undefined;
|
|
24
|
+
href?: string | undefined;
|
|
25
|
+
origin?: string | undefined;
|
|
26
|
+
protocol?: string | undefined;
|
|
27
|
+
username?: string | undefined;
|
|
28
|
+
password?: string | undefined;
|
|
29
|
+
host?: string | undefined;
|
|
30
|
+
hostname?: string | undefined;
|
|
31
|
+
port?: string | undefined;
|
|
32
|
+
pathname?: string | undefined;
|
|
33
|
+
search?: string | undefined;
|
|
34
|
+
hash?: string | undefined;
|
|
50
35
|
};
|
|
51
|
-
|
|
36
|
+
export class URLSanitizer extends URISchemes {
|
|
37
|
+
replace(data: string): string;
|
|
38
|
+
purify(dom: string): string;
|
|
39
|
+
sanitize(url: string, opt?: {
|
|
40
|
+
allow?: string[] | undefined;
|
|
41
|
+
deny?: string[] | undefined;
|
|
42
|
+
only?: string[] | undefined;
|
|
43
|
+
}): string | null;
|
|
44
|
+
parse(url: string, opt?: {
|
|
45
|
+
allow?: string[] | undefined;
|
|
46
|
+
deny?: string[] | undefined;
|
|
47
|
+
only?: string[] | undefined;
|
|
48
|
+
}): ParsedURL;
|
|
49
|
+
#private;
|
|
50
|
+
}
|
|
52
51
|
declare const urlSanitizer: URLSanitizer;
|
|
52
|
+
import { URISchemes } from './uri-util.js';
|