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/dist/es/core.js CHANGED
@@ -1732,7 +1732,7 @@ function stripslashes(value) {
1732
1732
  return value.replace(/\\(.)/g, "$1");
1733
1733
  }
1734
1734
  function escapeSelectorComponent(text) {
1735
- return text.toString().replace(/([:[\] ])/g, "\\$1");
1735
+ return text.toString().replace(/([^a-z0-9_-])/gi, "\\$1");
1736
1736
  }
1737
1737
  class Matcher {
1738
1738
  }
@@ -3086,7 +3086,7 @@ var TRANSFORMER_API;
3086
3086
  /** @public */
3087
3087
  const name = "html-validate";
3088
3088
  /** @public */
3089
- const version = "7.1.1";
3089
+ const version = "7.1.2";
3090
3090
  /** @public */
3091
3091
  const homepage = "https://html-validate.org";
3092
3092
  /** @public */
@@ -3421,11 +3421,11 @@ const mapping$1 = {
3421
3421
  script: "src",
3422
3422
  };
3423
3423
  const description = {
3424
- ["external" /* EXTERNAL */]: "External links are not allowed by current configuration.",
3425
- ["relative-base" /* RELATIVE_BASE */]: "Links relative to <base> are not allowed by current configuration.",
3426
- ["relative-path" /* RELATIVE_PATH */]: "Relative links are not allowed by current configuration.",
3427
- ["absolute" /* ABSOLUTE */]: "Absolute links are not allowed by current configuration.",
3428
- ["anchor" /* ANCHOR */]: null,
3424
+ ["external" /* Style.EXTERNAL */]: "External links are not allowed by current configuration.",
3425
+ ["relative-base" /* Style.RELATIVE_BASE */]: "Links relative to <base> are not allowed by current configuration.",
3426
+ ["relative-path" /* Style.RELATIVE_PATH */]: "Relative links are not allowed by current configuration.",
3427
+ ["absolute" /* Style.ABSOLUTE */]: "Absolute links are not allowed by current configuration.",
3428
+ ["anchor" /* Style.ANCHOR */]: null,
3429
3429
  };
3430
3430
  function parseAllow(value) {
3431
3431
  if (typeof value === "boolean") {
@@ -3498,19 +3498,19 @@ class AllowedLinks extends Rule {
3498
3498
  const link = event.value.toString();
3499
3499
  const style = this.getStyle(link);
3500
3500
  switch (style) {
3501
- case "anchor" /* ANCHOR */:
3501
+ case "anchor" /* Style.ANCHOR */:
3502
3502
  /* anchor links are always allowed by this rule */
3503
3503
  break;
3504
- case "absolute" /* ABSOLUTE */:
3504
+ case "absolute" /* Style.ABSOLUTE */:
3505
3505
  this.handleAbsolute(link, event, style);
3506
3506
  break;
3507
- case "external" /* EXTERNAL */:
3507
+ case "external" /* Style.EXTERNAL */:
3508
3508
  this.handleExternal(link, event, style);
3509
3509
  break;
3510
- case "relative-base" /* RELATIVE_BASE */:
3510
+ case "relative-base" /* Style.RELATIVE_BASE */:
3511
3511
  this.handleRelativeBase(link, event, style);
3512
3512
  break;
3513
- case "relative-path" /* RELATIVE_PATH */:
3513
+ case "relative-path" /* Style.RELATIVE_PATH */:
3514
3514
  this.handleRelativePath(link, event, style);
3515
3515
  break;
3516
3516
  }
@@ -3528,21 +3528,21 @@ class AllowedLinks extends Rule {
3528
3528
  getStyle(value) {
3529
3529
  /* http://example.net or //example.net */
3530
3530
  if (value.match(/^([a-z]+:)?\/\//g)) {
3531
- return "external" /* EXTERNAL */;
3531
+ return "external" /* Style.EXTERNAL */;
3532
3532
  }
3533
3533
  switch (value[0]) {
3534
3534
  /* /foo/bar */
3535
3535
  case "/":
3536
- return "absolute" /* ABSOLUTE */;
3536
+ return "absolute" /* Style.ABSOLUTE */;
3537
3537
  /* ../foo/bar */
3538
3538
  case ".":
3539
- return "relative-path" /* RELATIVE_PATH */;
3539
+ return "relative-path" /* Style.RELATIVE_PATH */;
3540
3540
  /* #foo */
3541
3541
  case "#":
3542
- return "anchor" /* ANCHOR */;
3542
+ return "anchor" /* Style.ANCHOR */;
3543
3543
  /* foo/bar */
3544
3544
  default:
3545
- return "relative-base" /* RELATIVE_BASE */;
3545
+ return "relative-base" /* Style.RELATIVE_BASE */;
3546
3546
  }
3547
3547
  }
3548
3548
  handleAbsolute(target, event, style) {