@angular/platform-server 22.0.0-rc.1 → 22.0.0-rc.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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v22.0.0-rc.1
2
+ * @license Angular v22.0.0-rc.2
3
3
  * (c) 2010-2026 Google LLC. https://angular.dev/
4
4
  * License: MIT
5
5
  */
@@ -19,7 +19,7 @@ const platformServerTesting = createPlatformFactory(platformCore, 'serverTesting
19
19
  class ServerTestingModule {
20
20
  static ɵfac = i0.ɵɵngDeclareFactory({
21
21
  minVersion: "12.0.0",
22
- version: "22.0.0-rc.1",
22
+ version: "22.0.0-rc.2",
23
23
  ngImport: i0,
24
24
  type: ServerTestingModule,
25
25
  deps: [],
@@ -27,14 +27,14 @@ class ServerTestingModule {
27
27
  });
28
28
  static ɵmod = i0.ɵɵngDeclareNgModule({
29
29
  minVersion: "14.0.0",
30
- version: "22.0.0-rc.1",
30
+ version: "22.0.0-rc.2",
31
31
  ngImport: i0,
32
32
  type: ServerTestingModule,
33
33
  exports: [BrowserDynamicTestingModule]
34
34
  });
35
35
  static ɵinj = i0.ɵɵngDeclareInjector({
36
36
  minVersion: "12.0.0",
37
- version: "22.0.0-rc.1",
37
+ version: "22.0.0-rc.2",
38
38
  ngImport: i0,
39
39
  type: ServerTestingModule,
40
40
  providers: SERVER_RENDER_PROVIDERS,
@@ -43,7 +43,7 @@ class ServerTestingModule {
43
43
  }
44
44
  i0.ɵɵngDeclareClassMetadata({
45
45
  minVersion: "12.0.0",
46
- version: "22.0.0-rc.1",
46
+ version: "22.0.0-rc.2",
47
47
  ngImport: i0,
48
48
  type: ServerTestingModule,
49
49
  decorators: [{
package/package.json CHANGED
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "@angular/platform-server",
3
- "version": "22.0.0-rc.1",
3
+ "version": "22.0.0-rc.2",
4
4
  "description": "Angular - library for using Angular in Node.js",
5
5
  "author": "angular",
6
6
  "license": "MIT",
7
7
  "engines": {
8
- "node": "^22.22.0 || ^24.13.1 || >=26.0.0"
8
+ "node": "^22.22.3 || ^24.15.0 || >=26.0.0"
9
9
  },
10
10
  "peerDependencies": {
11
- "@angular/common": "22.0.0-rc.1",
12
- "@angular/compiler": "22.0.0-rc.1",
13
- "@angular/core": "22.0.0-rc.1",
14
- "@angular/platform-browser": "22.0.0-rc.1",
11
+ "@angular/common": "22.0.0-rc.2",
12
+ "@angular/compiler": "22.0.0-rc.2",
13
+ "@angular/core": "22.0.0-rc.2",
14
+ "@angular/platform-browser": "22.0.0-rc.2",
15
15
  "rxjs": "^6.5.3 || ^7.4.0"
16
16
  },
17
17
  "dependencies": {
@@ -744,6 +744,7 @@ function requireNodeUtils () {
744
744
  XMP: true,
745
745
  IFRAME: true,
746
746
  NOEMBED: true,
747
+ NOSCRIPT: true,
747
748
  NOFRAMES: true,
748
749
  PLAINTEXT: true
749
750
  };
@@ -852,12 +853,15 @@ function requireNodeUtils () {
852
853
  if (!rawText.toLowerCase().includes(parentClosingTag)) {
853
854
  return rawText; // fast path
854
855
  }
855
- const result = [...rawText];
856
- const matches = rawText.matchAll(new RegExp(parentClosingTag, 'ig'));
857
- for (const match of matches) {
858
- result[match.index] = '<';
859
- }
860
- return result.join('');
856
+ // Replace via String.prototype.replace so we don't have to reconcile
857
+ // UTF-16 code-unit offsets (match.index) with code-point indexing
858
+ // (`[...rawText]`). Astral characters (e.g. emoji) before the match
859
+ // would otherwise shift the replacement and leave a real `</tag>`
860
+ // break-out in the output.
861
+ return rawText.replace(
862
+ new RegExp(parentClosingTag, 'ig'),
863
+ (m) => '&lt;' + m.slice(1)
864
+ );
861
865
  }
862
866
 
863
867
  const CLOSING_COMMENT_REGEXP = /--!?>/;
@@ -906,7 +910,8 @@ function requireNodeUtils () {
906
910
  var ss = kid.serialize();
907
911
  // If an element can have raw content, this content may
908
912
  // potentially require escaping to avoid XSS.
909
- if (hasRawContent[tagname.toUpperCase()]) {
913
+ var upperTag = tagname.toUpperCase();
914
+ if (hasRawContent[upperTag]) {
910
915
  ss = escapeMatchingClosingTag(ss, tagname);
911
916
  }
912
917
  if (html && extraNewLine[tagname] && ss.charAt(0)==='\n') s += '\n';
@@ -924,8 +929,7 @@ function requireNodeUtils () {
924
929
  else
925
930
  parenttag = '';
926
931
 
927
- if (hasRawContent[parenttag] ||
928
- (parenttag==='NOSCRIPT' && parent.ownerDocument._scripting_enabled)) {
932
+ if (hasRawContent[parenttag]) {
929
933
  s += kid.data;
930
934
  } else {
931
935
  s += escape(kid.data);