html-validate 7.1.1 → 7.1.2
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/{LICENCE → LICENSE} +0 -0
- package/dist/cjs/core.js +17 -17
- package/dist/cjs/core.js.map +1 -1
- package/dist/es/core.js +17 -17
- package/dist/es/core.js.map +1 -1
- package/elements/html5.js +6 -0
- package/package.json +26 -31
package/{LICENCE → LICENSE}
RENAMED
|
File without changes
|
package/dist/cjs/core.js
CHANGED
|
@@ -1763,7 +1763,7 @@ function stripslashes(value) {
|
|
|
1763
1763
|
return value.replace(/\\(.)/g, "$1");
|
|
1764
1764
|
}
|
|
1765
1765
|
function escapeSelectorComponent(text) {
|
|
1766
|
-
return text.toString().replace(/([
|
|
1766
|
+
return text.toString().replace(/([^a-z0-9_-])/gi, "\\$1");
|
|
1767
1767
|
}
|
|
1768
1768
|
class Matcher {
|
|
1769
1769
|
}
|
|
@@ -3117,7 +3117,7 @@ var TRANSFORMER_API;
|
|
|
3117
3117
|
/** @public */
|
|
3118
3118
|
const name = "html-validate";
|
|
3119
3119
|
/** @public */
|
|
3120
|
-
const version = "7.1.
|
|
3120
|
+
const version = "7.1.2";
|
|
3121
3121
|
/** @public */
|
|
3122
3122
|
const homepage = "https://html-validate.org";
|
|
3123
3123
|
/** @public */
|
|
@@ -3452,11 +3452,11 @@ const mapping$1 = {
|
|
|
3452
3452
|
script: "src",
|
|
3453
3453
|
};
|
|
3454
3454
|
const description = {
|
|
3455
|
-
["external" /* EXTERNAL */]: "External links are not allowed by current configuration.",
|
|
3456
|
-
["relative-base" /* RELATIVE_BASE */]: "Links relative to <base> are not allowed by current configuration.",
|
|
3457
|
-
["relative-path" /* RELATIVE_PATH */]: "Relative links are not allowed by current configuration.",
|
|
3458
|
-
["absolute" /* ABSOLUTE */]: "Absolute links are not allowed by current configuration.",
|
|
3459
|
-
["anchor" /* ANCHOR */]: null,
|
|
3455
|
+
["external" /* Style.EXTERNAL */]: "External links are not allowed by current configuration.",
|
|
3456
|
+
["relative-base" /* Style.RELATIVE_BASE */]: "Links relative to <base> are not allowed by current configuration.",
|
|
3457
|
+
["relative-path" /* Style.RELATIVE_PATH */]: "Relative links are not allowed by current configuration.",
|
|
3458
|
+
["absolute" /* Style.ABSOLUTE */]: "Absolute links are not allowed by current configuration.",
|
|
3459
|
+
["anchor" /* Style.ANCHOR */]: null,
|
|
3460
3460
|
};
|
|
3461
3461
|
function parseAllow(value) {
|
|
3462
3462
|
if (typeof value === "boolean") {
|
|
@@ -3529,19 +3529,19 @@ class AllowedLinks extends Rule {
|
|
|
3529
3529
|
const link = event.value.toString();
|
|
3530
3530
|
const style = this.getStyle(link);
|
|
3531
3531
|
switch (style) {
|
|
3532
|
-
case "anchor" /* ANCHOR */:
|
|
3532
|
+
case "anchor" /* Style.ANCHOR */:
|
|
3533
3533
|
/* anchor links are always allowed by this rule */
|
|
3534
3534
|
break;
|
|
3535
|
-
case "absolute" /* ABSOLUTE */:
|
|
3535
|
+
case "absolute" /* Style.ABSOLUTE */:
|
|
3536
3536
|
this.handleAbsolute(link, event, style);
|
|
3537
3537
|
break;
|
|
3538
|
-
case "external" /* EXTERNAL */:
|
|
3538
|
+
case "external" /* Style.EXTERNAL */:
|
|
3539
3539
|
this.handleExternal(link, event, style);
|
|
3540
3540
|
break;
|
|
3541
|
-
case "relative-base" /* RELATIVE_BASE */:
|
|
3541
|
+
case "relative-base" /* Style.RELATIVE_BASE */:
|
|
3542
3542
|
this.handleRelativeBase(link, event, style);
|
|
3543
3543
|
break;
|
|
3544
|
-
case "relative-path" /* RELATIVE_PATH */:
|
|
3544
|
+
case "relative-path" /* Style.RELATIVE_PATH */:
|
|
3545
3545
|
this.handleRelativePath(link, event, style);
|
|
3546
3546
|
break;
|
|
3547
3547
|
}
|
|
@@ -3559,21 +3559,21 @@ class AllowedLinks extends Rule {
|
|
|
3559
3559
|
getStyle(value) {
|
|
3560
3560
|
/* http://example.net or //example.net */
|
|
3561
3561
|
if (value.match(/^([a-z]+:)?\/\//g)) {
|
|
3562
|
-
return "external" /* EXTERNAL */;
|
|
3562
|
+
return "external" /* Style.EXTERNAL */;
|
|
3563
3563
|
}
|
|
3564
3564
|
switch (value[0]) {
|
|
3565
3565
|
/* /foo/bar */
|
|
3566
3566
|
case "/":
|
|
3567
|
-
return "absolute" /* ABSOLUTE */;
|
|
3567
|
+
return "absolute" /* Style.ABSOLUTE */;
|
|
3568
3568
|
/* ../foo/bar */
|
|
3569
3569
|
case ".":
|
|
3570
|
-
return "relative-path" /* RELATIVE_PATH */;
|
|
3570
|
+
return "relative-path" /* Style.RELATIVE_PATH */;
|
|
3571
3571
|
/* #foo */
|
|
3572
3572
|
case "#":
|
|
3573
|
-
return "anchor" /* ANCHOR */;
|
|
3573
|
+
return "anchor" /* Style.ANCHOR */;
|
|
3574
3574
|
/* foo/bar */
|
|
3575
3575
|
default:
|
|
3576
|
-
return "relative-base" /* RELATIVE_BASE */;
|
|
3576
|
+
return "relative-base" /* Style.RELATIVE_BASE */;
|
|
3577
3577
|
}
|
|
3578
3578
|
}
|
|
3579
3579
|
handleAbsolute(target, event, style) {
|