Link editing.
This commit is contained in:
@@ -38,3 +38,12 @@ export function safeDecodeURIComponent(s: string | undefined | null): string | u
|
||||
return s;
|
||||
}
|
||||
}
|
||||
|
||||
export function isValidUrl(url: string) {
|
||||
try {
|
||||
new URL(url);
|
||||
return true;
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user