@angular/platform-server 17.0.0-next.6 → 17.0.0-next.8

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.
@@ -654,7 +654,10 @@ var require_NodeUtils = __commonJS({
654
654
  "external/npm/node_modules/domino/lib/NodeUtils.js"(exports, module) {
655
655
  "use strict";
656
656
  module.exports = {
657
- serializeOne
657
+ serializeOne,
658
+ \u0275escapeMatchingClosingTag: escapeMatchingClosingTag,
659
+ \u0275escapeClosingCommentTag: escapeClosingCommentTag,
660
+ \u0275escapeProcessingInstructionContent: escapeProcessingInstructionContent
658
661
  };
659
662
  var utils = require_utils();
660
663
  var NAMESPACE = utils.NAMESPACE;
@@ -688,8 +691,13 @@ var require_NodeUtils = __commonJS({
688
691
  wbr: true
689
692
  };
690
693
  var extraNewLine = {};
694
+ var ESCAPE_REGEXP = /[&<>\u00A0]/g;
695
+ var ESCAPE_ATTR_REGEXP = /[&"<>\u00A0]/g;
691
696
  function escape(s) {
692
- return s.replace(/[&<>\u00A0]/g, function(c) {
697
+ if (!ESCAPE_REGEXP.test(s)) {
698
+ return s;
699
+ }
700
+ return s.replace(ESCAPE_REGEXP, (c) => {
693
701
  switch (c) {
694
702
  case "&":
695
703
  return "&amp;";
@@ -703,21 +711,23 @@ var require_NodeUtils = __commonJS({
703
711
  });
704
712
  }
705
713
  function escapeAttr(s) {
706
- var toEscape = /[&"\u00A0]/g;
707
- if (!toEscape.test(s)) {
714
+ if (!ESCAPE_ATTR_REGEXP.test(s)) {
708
715
  return s;
709
- } else {
710
- return s.replace(toEscape, function(c) {
711
- switch (c) {
712
- case "&":
713
- return "&amp;";
714
- case '"':
715
- return "&quot;";
716
- case "\xA0":
717
- return "&nbsp;";
718
- }
719
- });
720
716
  }
717
+ return s.replace(ESCAPE_ATTR_REGEXP, (c) => {
718
+ switch (c) {
719
+ case "<":
720
+ return "&lt;";
721
+ case ">":
722
+ return "&gt;";
723
+ case "&":
724
+ return "&amp;";
725
+ case '"':
726
+ return "&quot;";
727
+ case "\xA0":
728
+ return "&nbsp;";
729
+ }
730
+ });
721
731
  }
722
732
  function attrname(a) {
723
733
  var ns = a.namespaceURI;
@@ -735,6 +745,28 @@ var require_NodeUtils = __commonJS({
735
745
  }
736
746
  return a.name;
737
747
  }
748
+ function escapeMatchingClosingTag(rawText, parentTag) {
749
+ const parentClosingTag = "</" + parentTag;
750
+ if (!rawText.toLowerCase().includes(parentClosingTag)) {
751
+ return rawText;
752
+ }
753
+ const result = [...rawText];
754
+ const matches = rawText.matchAll(new RegExp(parentClosingTag, "ig"));
755
+ for (const match of matches) {
756
+ result[match.index] = "&lt;";
757
+ }
758
+ return result.join("");
759
+ }
760
+ var CLOSING_COMMENT_REGEXP = /--!?>/;
761
+ function escapeClosingCommentTag(rawContent) {
762
+ if (!CLOSING_COMMENT_REGEXP.test(rawContent)) {
763
+ return rawContent;
764
+ }
765
+ return rawContent.replace(/(--\!?)>/g, "$1&gt;");
766
+ }
767
+ function escapeProcessingInstructionContent(rawContent) {
768
+ return rawContent.includes(">") ? rawContent.replaceAll(">", "&gt;") : rawContent;
769
+ }
738
770
  function serializeOne(kid, parent) {
739
771
  var s = "";
740
772
  switch (kid.nodeType) {
@@ -752,6 +784,9 @@ var require_NodeUtils = __commonJS({
752
784
  s += ">";
753
785
  if (!(html && emptyElements[tagname])) {
754
786
  var ss = kid.serialize();
787
+ if (hasRawContent[tagname.toUpperCase()]) {
788
+ ss = escapeMatchingClosingTag(ss, tagname);
789
+ }
755
790
  if (html && extraNewLine[tagname] && ss.charAt(0) === "\n")
756
791
  s += "\n";
757
792
  s += ss;
@@ -772,10 +807,11 @@ var require_NodeUtils = __commonJS({
772
807
  }
773
808
  break;
774
809
  case 8:
775
- s += "<!--" + kid.data + "-->";
810
+ s += "<!--" + escapeClosingCommentTag(kid.data) + "-->";
776
811
  break;
777
812
  case 7:
778
- s += "<?" + kid.target + " " + kid.data + "?>";
813
+ const content = escapeProcessingInstructionContent(kid.data);
814
+ s += "<?" + kid.target + " " + content + "?>";
779
815
  break;
780
816
  case 10:
781
817
  s += "<!DOCTYPE " + kid.name;
@@ -10826,9 +10862,6 @@ var require_HTMLParser = __commonJS({
10826
10862
  case "plaintext":
10827
10863
  tokenizer = plaintext_state;
10828
10864
  break;
10829
- case "noscript":
10830
- if (scripting_enabled)
10831
- tokenizer = plaintext_state;
10832
10865
  }
10833
10866
  }
10834
10867
  var root = doc.createElement("html");
@@ -14582,12 +14615,6 @@ var require_HTMLParser = __commonJS({
14582
14615
  case "noembed":
14583
14616
  parseRawText(value, arg3);
14584
14617
  return;
14585
- case "noscript":
14586
- if (scripting_enabled) {
14587
- parseRawText(value, arg3);
14588
- return;
14589
- }
14590
- break;
14591
14618
  case "select":
14592
14619
  afereconstruct();
14593
14620
  insertHTMLElement(value, arg3);
@@ -26,10 +26,10 @@ export class ServerXhr {
26
26
  }
27
27
  return new impl.XMLHttpRequest();
28
28
  }
29
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-next.6", ngImport: i0, type: ServerXhr, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
30
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.0-next.6", ngImport: i0, type: ServerXhr }); }
29
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: ServerXhr, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
30
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: ServerXhr }); }
31
31
  }
32
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.6", ngImport: i0, type: ServerXhr, decorators: [{
32
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: ServerXhr, decorators: [{
33
33
  type: Injectable
34
34
  }] });
35
35
  export const SERVER_HTTP_PROVIDERS = [
@@ -105,10 +105,10 @@ export class ServerPlatformLocation {
105
105
  getState() {
106
106
  return undefined;
107
107
  }
108
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-next.6", ngImport: i0, type: ServerPlatformLocation, deps: [{ token: DOCUMENT }, { token: INITIAL_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
109
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.0-next.6", ngImport: i0, type: ServerPlatformLocation }); }
108
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: ServerPlatformLocation, deps: [{ token: DOCUMENT }, { token: INITIAL_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
109
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: ServerPlatformLocation }); }
110
110
  }
111
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.6", ngImport: i0, type: ServerPlatformLocation, decorators: [{
111
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: ServerPlatformLocation, decorators: [{
112
112
  type: Injectable
113
113
  }], ctorParameters: () => [{ type: undefined, decorators: [{
114
114
  type: Inject,
@@ -30,10 +30,10 @@ export class PlatformState {
30
30
  getDocument() {
31
31
  return this._doc;
32
32
  }
33
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-next.6", ngImport: i0, type: PlatformState, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
34
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.0-next.6", ngImport: i0, type: PlatformState }); }
33
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: PlatformState, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
34
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: PlatformState }); }
35
35
  }
36
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.6", ngImport: i0, type: PlatformState, decorators: [{
36
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: PlatformState, decorators: [{
37
37
  type: Injectable
38
38
  }], ctorParameters: () => [{ type: undefined, decorators: [{
39
39
  type: Inject,
@@ -52,11 +52,11 @@ export const PLATFORM_SERVER_PROVIDERS = [
52
52
  * @publicApi
53
53
  */
54
54
  export class ServerModule {
55
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-next.6", ngImport: i0, type: ServerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
56
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.0-next.6", ngImport: i0, type: ServerModule, imports: [HttpClientModule, NoopAnimationsModule], exports: [BrowserModule] }); }
57
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.0-next.6", ngImport: i0, type: ServerModule, providers: PLATFORM_SERVER_PROVIDERS, imports: [HttpClientModule, NoopAnimationsModule, BrowserModule] }); }
55
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: ServerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
56
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.0-next.8", ngImport: i0, type: ServerModule, imports: [HttpClientModule, NoopAnimationsModule], exports: [BrowserModule] }); }
57
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: ServerModule, providers: PLATFORM_SERVER_PROVIDERS, imports: [HttpClientModule, NoopAnimationsModule, BrowserModule] }); }
58
58
  }
59
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.6", ngImport: i0, type: ServerModule, decorators: [{
59
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: ServerModule, decorators: [{
60
60
  type: NgModule,
61
61
  args: [{
62
62
  exports: [BrowserModule],
@@ -21,10 +21,10 @@ export class ServerEventManagerPlugin extends EventManagerPlugin {
21
21
  addEventListener(element, eventName, handler) {
22
22
  return getDOM().onAndCancel(element, eventName, handler);
23
23
  }
24
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-next.6", ngImport: i0, type: ServerEventManagerPlugin, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
25
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.0-next.6", ngImport: i0, type: ServerEventManagerPlugin }); }
24
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: ServerEventManagerPlugin, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
25
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: ServerEventManagerPlugin }); }
26
26
  }
27
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.6", ngImport: i0, type: ServerEventManagerPlugin, decorators: [{
27
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: ServerEventManagerPlugin, decorators: [{
28
28
  type: Injectable
29
29
  }], ctorParameters: () => [{ type: undefined, decorators: [{
30
30
  type: Inject,
@@ -47,11 +47,11 @@ function serializeTransferStateFactory(doc, appId, transferStore) {
47
47
  * this module.
48
48
  */
49
49
  export class ServerTransferStateModule {
50
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-next.6", ngImport: i0, type: ServerTransferStateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
51
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.0-next.6", ngImport: i0, type: ServerTransferStateModule }); }
52
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.0-next.6", ngImport: i0, type: ServerTransferStateModule }); }
50
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: ServerTransferStateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
51
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.0-next.8", ngImport: i0, type: ServerTransferStateModule }); }
52
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: ServerTransferStateModule }); }
53
53
  }
54
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.6", ngImport: i0, type: ServerTransferStateModule, decorators: [{
54
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: ServerTransferStateModule, decorators: [{
55
55
  type: NgModule,
56
56
  args: [{}]
57
57
  }] });
@@ -14,5 +14,5 @@ import { Version } from '@angular/core';
14
14
  /**
15
15
  * @publicApi
16
16
  */
17
- export const VERSION = new Version('17.0.0-next.6');
17
+ export const VERSION = new Version('17.0.0-next.8');
18
18
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmVyc2lvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL3BsYXRmb3JtLXNlcnZlci9zcmMvdmVyc2lvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7O0dBTUc7QUFFSDs7OztHQUlHO0FBRUgsT0FBTyxFQUFDLE9BQU8sRUFBQyxNQUFNLGVBQWUsQ0FBQztBQUV0Qzs7R0FFRztBQUNILE1BQU0sQ0FBQyxNQUFNLE9BQU8sR0FBRyxJQUFJLE9BQU8sQ0FBQyxtQkFBbUIsQ0FBQyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBAbGljZW5zZVxuICogQ29weXJpZ2h0IEdvb2dsZSBMTEMgQWxsIFJpZ2h0cyBSZXNlcnZlZC5cbiAqXG4gKiBVc2Ugb2YgdGhpcyBzb3VyY2UgY29kZSBpcyBnb3Zlcm5lZCBieSBhbiBNSVQtc3R5bGUgbGljZW5zZSB0aGF0IGNhbiBiZVxuICogZm91bmQgaW4gdGhlIExJQ0VOU0UgZmlsZSBhdCBodHRwczovL2FuZ3VsYXIuaW8vbGljZW5zZVxuICovXG5cbi8qKlxuICogQG1vZHVsZVxuICogQGRlc2NyaXB0aW9uXG4gKiBFbnRyeSBwb2ludCBmb3IgYWxsIHB1YmxpYyBBUElzIG9mIHRoZSBwbGF0Zm9ybS1zZXJ2ZXIgcGFja2FnZS5cbiAqL1xuXG5pbXBvcnQge1ZlcnNpb259IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xuXG4vKipcbiAqIEBwdWJsaWNBcGlcbiAqL1xuZXhwb3J0IGNvbnN0IFZFUlNJT04gPSBuZXcgVmVyc2lvbignMC4wLjAtUExBQ0VIT0xERVInKTtcbiJdfQ==
@@ -22,11 +22,11 @@ export const platformServerTesting = createPlatformFactory(platformCoreDynamicTe
22
22
  * @publicApi
23
23
  */
24
24
  export class ServerTestingModule {
25
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-next.6", ngImport: i0, type: ServerTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
26
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.0-next.6", ngImport: i0, type: ServerTestingModule, imports: [NoopAnimationsModule], exports: [BrowserDynamicTestingModule] }); }
27
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.0-next.6", ngImport: i0, type: ServerTestingModule, providers: SERVER_RENDER_PROVIDERS, imports: [NoopAnimationsModule, BrowserDynamicTestingModule] }); }
25
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: ServerTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
26
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.0-next.8", ngImport: i0, type: ServerTestingModule, imports: [NoopAnimationsModule], exports: [BrowserDynamicTestingModule] }); }
27
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: ServerTestingModule, providers: SERVER_RENDER_PROVIDERS, imports: [NoopAnimationsModule, BrowserDynamicTestingModule] }); }
28
28
  }
29
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.6", ngImport: i0, type: ServerTestingModule, decorators: [{
29
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: ServerTestingModule, decorators: [{
30
30
  type: NgModule,
31
31
  args: [{
32
32
  exports: [BrowserDynamicTestingModule],
package/fesm2022/init.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v17.0.0-next.6
2
+ * @license Angular v17.0.0-next.8
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v17.0.0-next.6
2
+ * @license Angular v17.0.0-next.8
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -669,7 +669,10 @@ var require_NodeUtils = __commonJS({
669
669
  "external/npm/node_modules/domino/lib/NodeUtils.js"(exports, module) {
670
670
  "use strict";
671
671
  module.exports = {
672
- serializeOne
672
+ serializeOne,
673
+ \u0275escapeMatchingClosingTag: escapeMatchingClosingTag,
674
+ \u0275escapeClosingCommentTag: escapeClosingCommentTag,
675
+ \u0275escapeProcessingInstructionContent: escapeProcessingInstructionContent
673
676
  };
674
677
  var utils = require_utils();
675
678
  var NAMESPACE = utils.NAMESPACE;
@@ -703,8 +706,13 @@ var require_NodeUtils = __commonJS({
703
706
  wbr: true
704
707
  };
705
708
  var extraNewLine = {};
709
+ var ESCAPE_REGEXP = /[&<>\u00A0]/g;
710
+ var ESCAPE_ATTR_REGEXP = /[&"<>\u00A0]/g;
706
711
  function escape(s) {
707
- return s.replace(/[&<>\u00A0]/g, function(c) {
712
+ if (!ESCAPE_REGEXP.test(s)) {
713
+ return s;
714
+ }
715
+ return s.replace(ESCAPE_REGEXP, (c) => {
708
716
  switch (c) {
709
717
  case "&":
710
718
  return "&amp;";
@@ -718,21 +726,23 @@ var require_NodeUtils = __commonJS({
718
726
  });
719
727
  }
720
728
  function escapeAttr(s) {
721
- var toEscape = /[&"\u00A0]/g;
722
- if (!toEscape.test(s)) {
729
+ if (!ESCAPE_ATTR_REGEXP.test(s)) {
723
730
  return s;
724
- } else {
725
- return s.replace(toEscape, function(c) {
726
- switch (c) {
727
- case "&":
728
- return "&amp;";
729
- case '"':
730
- return "&quot;";
731
- case "\xA0":
732
- return "&nbsp;";
733
- }
734
- });
735
731
  }
732
+ return s.replace(ESCAPE_ATTR_REGEXP, (c) => {
733
+ switch (c) {
734
+ case "<":
735
+ return "&lt;";
736
+ case ">":
737
+ return "&gt;";
738
+ case "&":
739
+ return "&amp;";
740
+ case '"':
741
+ return "&quot;";
742
+ case "\xA0":
743
+ return "&nbsp;";
744
+ }
745
+ });
736
746
  }
737
747
  function attrname(a) {
738
748
  var ns = a.namespaceURI;
@@ -750,6 +760,28 @@ var require_NodeUtils = __commonJS({
750
760
  }
751
761
  return a.name;
752
762
  }
763
+ function escapeMatchingClosingTag(rawText, parentTag) {
764
+ const parentClosingTag = "</" + parentTag;
765
+ if (!rawText.toLowerCase().includes(parentClosingTag)) {
766
+ return rawText;
767
+ }
768
+ const result = [...rawText];
769
+ const matches = rawText.matchAll(new RegExp(parentClosingTag, "ig"));
770
+ for (const match of matches) {
771
+ result[match.index] = "&lt;";
772
+ }
773
+ return result.join("");
774
+ }
775
+ var CLOSING_COMMENT_REGEXP = /--!?>/;
776
+ function escapeClosingCommentTag(rawContent) {
777
+ if (!CLOSING_COMMENT_REGEXP.test(rawContent)) {
778
+ return rawContent;
779
+ }
780
+ return rawContent.replace(/(--\!?)>/g, "$1&gt;");
781
+ }
782
+ function escapeProcessingInstructionContent(rawContent) {
783
+ return rawContent.includes(">") ? rawContent.replaceAll(">", "&gt;") : rawContent;
784
+ }
753
785
  function serializeOne(kid, parent) {
754
786
  var s = "";
755
787
  switch (kid.nodeType) {
@@ -767,6 +799,9 @@ var require_NodeUtils = __commonJS({
767
799
  s += ">";
768
800
  if (!(html && emptyElements[tagname])) {
769
801
  var ss = kid.serialize();
802
+ if (hasRawContent[tagname.toUpperCase()]) {
803
+ ss = escapeMatchingClosingTag(ss, tagname);
804
+ }
770
805
  if (html && extraNewLine[tagname] && ss.charAt(0) === "\n")
771
806
  s += "\n";
772
807
  s += ss;
@@ -787,10 +822,11 @@ var require_NodeUtils = __commonJS({
787
822
  }
788
823
  break;
789
824
  case 8:
790
- s += "<!--" + kid.data + "-->";
825
+ s += "<!--" + escapeClosingCommentTag(kid.data) + "-->";
791
826
  break;
792
827
  case 7:
793
- s += "<?" + kid.target + " " + kid.data + "?>";
828
+ const content = escapeProcessingInstructionContent(kid.data);
829
+ s += "<?" + kid.target + " " + content + "?>";
794
830
  break;
795
831
  case 10:
796
832
  s += "<!DOCTYPE " + kid.name;
@@ -10841,9 +10877,6 @@ var require_HTMLParser = __commonJS({
10841
10877
  case "plaintext":
10842
10878
  tokenizer = plaintext_state;
10843
10879
  break;
10844
- case "noscript":
10845
- if (scripting_enabled)
10846
- tokenizer = plaintext_state;
10847
10880
  }
10848
10881
  }
10849
10882
  var root = doc.createElement("html");
@@ -14597,12 +14630,6 @@ var require_HTMLParser = __commonJS({
14597
14630
  case "noembed":
14598
14631
  parseRawText(value, arg3);
14599
14632
  return;
14600
- case "noscript":
14601
- if (scripting_enabled) {
14602
- parseRawText(value, arg3);
14603
- return;
14604
- }
14605
- break;
14606
14633
  case "select":
14607
14634
  afereconstruct();
14608
14635
  insertHTMLElement(value, arg3);
@@ -16188,10 +16215,10 @@ class PlatformState {
16188
16215
  getDocument() {
16189
16216
  return this._doc;
16190
16217
  }
16191
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-next.6", ngImport: i0, type: PlatformState, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
16192
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.0-next.6", ngImport: i0, type: PlatformState }); }
16218
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: PlatformState, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
16219
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: PlatformState }); }
16193
16220
  }
16194
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.6", ngImport: i0, type: PlatformState, decorators: [{
16221
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: PlatformState, decorators: [{
16195
16222
  type: Injectable
16196
16223
  }], ctorParameters: () => [{ type: undefined, decorators: [{
16197
16224
  type: Inject,
@@ -16216,10 +16243,10 @@ class ServerXhr {
16216
16243
  }
16217
16244
  return new impl.XMLHttpRequest();
16218
16245
  }
16219
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-next.6", ngImport: i0, type: ServerXhr, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
16220
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.0-next.6", ngImport: i0, type: ServerXhr }); }
16246
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: ServerXhr, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
16247
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: ServerXhr }); }
16221
16248
  }
16222
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.6", ngImport: i0, type: ServerXhr, decorators: [{
16249
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: ServerXhr, decorators: [{
16223
16250
  type: Injectable
16224
16251
  }] });
16225
16252
  const SERVER_HTTP_PROVIDERS = [
@@ -16334,10 +16361,10 @@ class ServerPlatformLocation {
16334
16361
  getState() {
16335
16362
  return undefined;
16336
16363
  }
16337
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-next.6", ngImport: i0, type: ServerPlatformLocation, deps: [{ token: DOCUMENT }, { token: INITIAL_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
16338
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.0-next.6", ngImport: i0, type: ServerPlatformLocation }); }
16364
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: ServerPlatformLocation, deps: [{ token: DOCUMENT }, { token: INITIAL_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
16365
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: ServerPlatformLocation }); }
16339
16366
  }
16340
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.6", ngImport: i0, type: ServerPlatformLocation, decorators: [{
16367
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: ServerPlatformLocation, decorators: [{
16341
16368
  type: Injectable
16342
16369
  }], ctorParameters: () => [{ type: undefined, decorators: [{
16343
16370
  type: Inject,
@@ -16361,10 +16388,10 @@ class ServerEventManagerPlugin extends EventManagerPlugin {
16361
16388
  addEventListener(element, eventName, handler) {
16362
16389
  return ɵgetDOM().onAndCancel(element, eventName, handler);
16363
16390
  }
16364
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-next.6", ngImport: i0, type: ServerEventManagerPlugin, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
16365
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.0-next.6", ngImport: i0, type: ServerEventManagerPlugin }); }
16391
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: ServerEventManagerPlugin, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
16392
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: ServerEventManagerPlugin }); }
16366
16393
  }
16367
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.6", ngImport: i0, type: ServerEventManagerPlugin, decorators: [{
16394
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: ServerEventManagerPlugin, decorators: [{
16368
16395
  type: Injectable
16369
16396
  }], ctorParameters: () => [{ type: undefined, decorators: [{
16370
16397
  type: Inject,
@@ -16409,11 +16436,11 @@ function serializeTransferStateFactory(doc, appId, transferStore) {
16409
16436
  * this module.
16410
16437
  */
16411
16438
  class ServerTransferStateModule {
16412
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-next.6", ngImport: i0, type: ServerTransferStateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
16413
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.0-next.6", ngImport: i0, type: ServerTransferStateModule }); }
16414
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.0-next.6", ngImport: i0, type: ServerTransferStateModule }); }
16439
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: ServerTransferStateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
16440
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.0-next.8", ngImport: i0, type: ServerTransferStateModule }); }
16441
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: ServerTransferStateModule }); }
16415
16442
  }
16416
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.6", ngImport: i0, type: ServerTransferStateModule, decorators: [{
16443
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: ServerTransferStateModule, decorators: [{
16417
16444
  type: NgModule,
16418
16445
  args: [{}]
16419
16446
  }] });
@@ -16452,11 +16479,11 @@ const PLATFORM_SERVER_PROVIDERS = [
16452
16479
  * @publicApi
16453
16480
  */
16454
16481
  class ServerModule {
16455
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-next.6", ngImport: i0, type: ServerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
16456
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.0-next.6", ngImport: i0, type: ServerModule, imports: [HttpClientModule, NoopAnimationsModule], exports: [BrowserModule] }); }
16457
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.0-next.6", ngImport: i0, type: ServerModule, providers: PLATFORM_SERVER_PROVIDERS, imports: [HttpClientModule, NoopAnimationsModule, BrowserModule] }); }
16482
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: ServerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
16483
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.0-next.8", ngImport: i0, type: ServerModule, imports: [HttpClientModule, NoopAnimationsModule], exports: [BrowserModule] }); }
16484
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: ServerModule, providers: PLATFORM_SERVER_PROVIDERS, imports: [HttpClientModule, NoopAnimationsModule, BrowserModule] }); }
16458
16485
  }
16459
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.6", ngImport: i0, type: ServerModule, decorators: [{
16486
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: ServerModule, decorators: [{
16460
16487
  type: NgModule,
16461
16488
  args: [{
16462
16489
  exports: [BrowserModule],
@@ -16676,7 +16703,7 @@ async function renderApplication(bootstrap, options) {
16676
16703
  /**
16677
16704
  * @publicApi
16678
16705
  */
16679
- const VERSION = new Version('17.0.0-next.6');
16706
+ const VERSION = new Version('17.0.0-next.8');
16680
16707
 
16681
16708
  /// <reference types="node" />
16682
16709
  // This file only reexports content of the `src` folder. Keep it that way.