We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e18de1f commit 14156e1Copy full SHA for 14156e1
src/core.ts
@@ -986,8 +986,8 @@ export const safeJSON = (text: string) => {
986
}
987
};
988
989
-// https://stackoverflow.com/a/19709846
990
-const startsWithSchemeRegexp = new RegExp('^(?:[a-z]+:)?//', 'i');
+// https://url.spec.whatwg.org/#url-scheme-string
+const startsWithSchemeRegexp = /^[a-z][a-z0-9+.-]*:/i;
991
const isAbsoluteURL = (url: string): boolean => {
992
return startsWithSchemeRegexp.test(url);
993
0 commit comments