@angular/platform-server 20.3.23 → 20.3.24
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/fesm2022/init.mjs +47 -17
- package/fesm2022/init.mjs.map +1 -1
- package/fesm2022/platform-server.mjs +2 -2
- package/fesm2022/platform-server.mjs.map +1 -1
- package/fesm2022/server.mjs +148 -57
- package/fesm2022/server.mjs.map +1 -1
- package/fesm2022/testing.mjs +5 -5
- package/index.d.ts +1 -1
- package/init/index.d.ts +1 -1
- package/package.json +5 -5
- package/testing/index.d.ts +1 -1
package/fesm2022/init.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v20.3.
|
|
2
|
+
* @license Angular v20.3.24
|
|
3
3
|
* (c) 2010-2025 Google LLC. https://angular.dev/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -750,6 +750,7 @@ function requireNodeUtils () {
|
|
|
750
750
|
XMP: true,
|
|
751
751
|
IFRAME: true,
|
|
752
752
|
NOEMBED: true,
|
|
753
|
+
NOSCRIPT: true,
|
|
753
754
|
NOFRAMES: true,
|
|
754
755
|
PLAINTEXT: true
|
|
755
756
|
};
|
|
@@ -858,12 +859,15 @@ function requireNodeUtils () {
|
|
|
858
859
|
if (!rawText.toLowerCase().includes(parentClosingTag)) {
|
|
859
860
|
return rawText; // fast path
|
|
860
861
|
}
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
return
|
|
862
|
+
// Replace via String.prototype.replace so we don't have to reconcile
|
|
863
|
+
// UTF-16 code-unit offsets (match.index) with code-point indexing
|
|
864
|
+
// (`[...rawText]`). Astral characters (e.g. emoji) before the match
|
|
865
|
+
// would otherwise shift the replacement and leave a real `</tag>`
|
|
866
|
+
// break-out in the output.
|
|
867
|
+
return rawText.replace(
|
|
868
|
+
new RegExp(parentClosingTag, 'ig'),
|
|
869
|
+
(m) => '<' + m.slice(1)
|
|
870
|
+
);
|
|
867
871
|
}
|
|
868
872
|
|
|
869
873
|
const CLOSING_COMMENT_REGEXP = /--!?>/;
|
|
@@ -912,7 +916,8 @@ function requireNodeUtils () {
|
|
|
912
916
|
var ss = kid.serialize();
|
|
913
917
|
// If an element can have raw content, this content may
|
|
914
918
|
// potentially require escaping to avoid XSS.
|
|
915
|
-
|
|
919
|
+
var upperTag = tagname.toUpperCase();
|
|
920
|
+
if (hasRawContent[upperTag]) {
|
|
916
921
|
ss = escapeMatchingClosingTag(ss, tagname);
|
|
917
922
|
}
|
|
918
923
|
if (html && extraNewLine[tagname] && ss.charAt(0)==='\n') s += '\n';
|
|
@@ -930,8 +935,7 @@ function requireNodeUtils () {
|
|
|
930
935
|
else
|
|
931
936
|
parenttag = '';
|
|
932
937
|
|
|
933
|
-
if (hasRawContent[parenttag]
|
|
934
|
-
(parenttag==='NOSCRIPT' && parent.ownerDocument._scripting_enabled)) {
|
|
938
|
+
if (hasRawContent[parenttag]) {
|
|
935
939
|
s += kid.data;
|
|
936
940
|
} else {
|
|
937
941
|
s += escape(kid.data);
|
|
@@ -3611,9 +3615,9 @@ function requireElement () {
|
|
|
3611
3615
|
ContainerNode.call(this);
|
|
3612
3616
|
this.nodeType = Node.ELEMENT_NODE;
|
|
3613
3617
|
this.ownerDocument = doc;
|
|
3614
|
-
this.
|
|
3618
|
+
this._localName = localName;
|
|
3615
3619
|
this.namespaceURI = namespaceURI;
|
|
3616
|
-
this.
|
|
3620
|
+
this._prefix = prefix;
|
|
3617
3621
|
this._tagName = undefined;
|
|
3618
3622
|
|
|
3619
3623
|
// These properties maintain the set of attributes
|
|
@@ -3633,6 +3637,14 @@ function requireElement () {
|
|
|
3633
3637
|
}
|
|
3634
3638
|
|
|
3635
3639
|
Element.prototype = Object.create(ContainerNode.prototype, {
|
|
3640
|
+
localName: {
|
|
3641
|
+
get: function () { return this._localName; },
|
|
3642
|
+
set: function () { /* no-op per spec */ }
|
|
3643
|
+
},
|
|
3644
|
+
prefix: {
|
|
3645
|
+
get: function () { return this._prefix; },
|
|
3646
|
+
set: function () { /* no-op per spec */ }
|
|
3647
|
+
},
|
|
3636
3648
|
isHTML: { get: function isHTML() {
|
|
3637
3649
|
return this.namespaceURI === NAMESPACE.HTML && this.ownerDocument.isHTML;
|
|
3638
3650
|
}},
|
|
@@ -3655,7 +3667,9 @@ function requireElement () {
|
|
|
3655
3667
|
this._tagName = tn;
|
|
3656
3668
|
}
|
|
3657
3669
|
return this._tagName;
|
|
3658
|
-
|
|
3670
|
+
},
|
|
3671
|
+
set: function () { /* no-op per spec */ }
|
|
3672
|
+
},
|
|
3659
3673
|
nodeName: { get: function() { return this.tagName; }},
|
|
3660
3674
|
nodeValue: {
|
|
3661
3675
|
get: function() {
|
|
@@ -4561,8 +4575,8 @@ function requireElement () {
|
|
|
4561
4575
|
function Attr(elt, lname, prefix, namespace, value) {
|
|
4562
4576
|
// localName and namespace are constant for any attr object.
|
|
4563
4577
|
// But value may change. And so can prefix, and so, therefore can name.
|
|
4564
|
-
this.
|
|
4565
|
-
this.
|
|
4578
|
+
this._localName = lname;
|
|
4579
|
+
this._prefix = (prefix===null || prefix==='') ? null : ('' + prefix);
|
|
4566
4580
|
this.namespaceURI = (namespace===null || namespace==='') ? null : ('' + namespace);
|
|
4567
4581
|
this.data = value;
|
|
4568
4582
|
// Set ownerElement last to ensure it is hooked up to onchange handler
|
|
@@ -4571,6 +4585,14 @@ function requireElement () {
|
|
|
4571
4585
|
|
|
4572
4586
|
// In DOM 3 Attr was supposed to extend Node; in DOM 4 that was abandoned.
|
|
4573
4587
|
Attr.prototype = Object.create(Object.prototype, {
|
|
4588
|
+
localName: {
|
|
4589
|
+
get: function () { return this._localName; },
|
|
4590
|
+
set: function () { /* no-op per spec */ }
|
|
4591
|
+
},
|
|
4592
|
+
prefix: {
|
|
4593
|
+
get: function () { return this._prefix; },
|
|
4594
|
+
set: function () { /* no-op per spec */ }
|
|
4595
|
+
},
|
|
4574
4596
|
ownerElement: {
|
|
4575
4597
|
get: function() { return this._ownerElement; },
|
|
4576
4598
|
},
|
|
@@ -5203,7 +5225,7 @@ function requireProcessingInstruction () {
|
|
|
5203
5225
|
CharacterData.call(this);
|
|
5204
5226
|
this.nodeType = Node.PROCESSING_INSTRUCTION_NODE;
|
|
5205
5227
|
this.ownerDocument = doc;
|
|
5206
|
-
this.
|
|
5228
|
+
this._target = target;
|
|
5207
5229
|
this._data = data;
|
|
5208
5230
|
}
|
|
5209
5231
|
|
|
@@ -5217,6 +5239,10 @@ function requireProcessingInstruction () {
|
|
|
5217
5239
|
};
|
|
5218
5240
|
|
|
5219
5241
|
ProcessingInstruction.prototype = Object.create(CharacterData.prototype, {
|
|
5242
|
+
target: {
|
|
5243
|
+
get: function () { return this._target; },
|
|
5244
|
+
set: function () { /* no-op per spec */ }
|
|
5245
|
+
},
|
|
5220
5246
|
nodeName: { get: function() { return this.target; }},
|
|
5221
5247
|
nodeValue: nodeValue,
|
|
5222
5248
|
textContent: nodeValue,
|
|
@@ -9382,12 +9408,16 @@ function requireDocumentType () {
|
|
|
9382
9408
|
Leaf.call(this);
|
|
9383
9409
|
this.nodeType = Node.DOCUMENT_TYPE_NODE;
|
|
9384
9410
|
this.ownerDocument = ownerDocument || null;
|
|
9385
|
-
this.
|
|
9411
|
+
this._name = name;
|
|
9386
9412
|
this.publicId = publicId || "";
|
|
9387
9413
|
this.systemId = systemId || "";
|
|
9388
9414
|
}
|
|
9389
9415
|
|
|
9390
9416
|
DocumentType.prototype = Object.create(Leaf.prototype, {
|
|
9417
|
+
name: {
|
|
9418
|
+
get: function() { return this._name; },
|
|
9419
|
+
set: function() { /* no-op per spec */ }
|
|
9420
|
+
},
|
|
9391
9421
|
nodeName: { get: function() { return this.name; }},
|
|
9392
9422
|
nodeValue: {
|
|
9393
9423
|
get: function() { return null; },
|