trousse 2.15.0 → 2.15.1
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/urls.js +2 -1
- package/package.json +1 -1
package/dist/urls.js
CHANGED
|
@@ -150,7 +150,8 @@ const schemeColonRegex = /^[^/]*:/;
|
|
|
150
150
|
const missingColonSchemeRegex = /^https?[\s=.\\]*\/\//i;
|
|
151
151
|
const validUrlRegex = /^https?:\/\/(?:www\.|[a-vx-z0-9])/i;
|
|
152
152
|
const schemeSeparator = String.raw`\.*[:\s=\\/][:\s=.\\/]*`;
|
|
153
|
-
const
|
|
153
|
+
const separatorChar = String.raw`(?:[:\s=.\\/]|%20|%c2%a0)`;
|
|
154
|
+
const leadingSchemeSeparator = String.raw`\.*(?::${separatorChar}*|[\s=\\/]${separatorChar}+)`;
|
|
154
155
|
const doubledSchemeRegex = /* @__PURE__ */ new RegExp(String.raw`^\/?[htps]{2,7}${leadingSchemeSeparator}([htps]{2,7})(?!:\d|[^/?#\\]*@)(${schemeSeparator})[.,:/]*(www[./]+)?`, "i");
|
|
155
156
|
const singleMalformedRegex = /* @__PURE__ */ new RegExp(String.raw`^\/?(h[htps():]{1,10}|t{1,2}ps?)(${leadingSchemeSeparator})[.,:/]*(www[./]+)?`, "i");
|
|
156
157
|
const isSchemeToken = (token, separator) => {
|
package/package.json
CHANGED