fix regex

This commit is contained in:
Philipinho
2026-03-25 09:47:49 +00:00
parent 536dbf5e49
commit e9aea1a9e0
+1 -1
View File
@@ -96,7 +96,7 @@ export function getPageIcon(icon: string, size = 18): string | ReactNode {
export const normalizeUrl = (url: string): string => { export const normalizeUrl = (url: string): string => {
if (!url) return url; if (!url) return url;
if (url.startsWith("/") || /^(\S+):(\/\/)?\S+$/.test(url)) return url; if (url.startsWith("/") || /^[a-zA-Z][a-zA-Z0-9+.-]*:/.test(url)) return url;
return `https://${url}`; return `https://${url}`;
}; };