Skip to content

Commit 48b06c6

Browse files
committed
main - 1d42431 refactor: move trusted types logic into CDK (#32387)
1 parent eff4d10 commit 48b06c6

File tree

2 files changed

+86
-9
lines changed

2 files changed

+86
-9
lines changed

docs-content/api-docs/cdk-private.html

Lines changed: 78 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,81 @@
1919
<h2>
2020
API reference for Angular CDK private
2121
</h2>
22-
<p>Import symbols from <code>@angular/cdk/private</code></p></div>
22+
<p>Import symbols from <code>@angular/cdk/private</code></p><h3 id="cdk-private-interfaces" class="docs-header-link docs-api-h3">
23+
<span header-link="interfaces"></span>
24+
Interfaces
25+
</h3>
26+
27+
28+
29+
<h4 id="TrustedHTML" class="docs-header-link docs-api-h4 docs-api-interface-name">
30+
<span header-link="TrustedHTML"></span>
31+
<code>TrustedHTML</code>
32+
</h4>
33+
34+
35+
36+
37+
38+
39+
<h3 id="cdk-private-functions" class="docs-header-link docs-api-h3">
40+
<span header-link="functions"></span>
41+
Functions
42+
</h3>
43+
44+
45+
46+
47+
<table class="docs-api-method-table">
48+
<thead>
49+
<tr class="docs-api-method-name-row">
50+
<th colspan="2" class="docs-api-method-name-cell">trustedHTMLFromString
51+
</th>
52+
</tr>
53+
</thead><tr class="docs-api-method-description-row">
54+
<td colspan="2" class="docs-api-method-description-cell">
55+
<p>Unsafely promote a string to a TrustedHTML, falling back to strings when
56+
Trusted Types are not available.</p>
57+
<p>Important!!! This is a security-sensitive function; any use of this function
58+
must go through security review. In particular, it must be assured that the
59+
provided string will never cause an XSS vulnerability if used in a context
60+
that will be interpreted as HTML by a browser, e.g. when assigning to
61+
element.innerHTML.</p>
62+
63+
</td>
64+
</tr><thead>
65+
<tr class="docs-api-method-parameters-header-row">
66+
<th colspan="2" class="docs-api-method-parameters-header-cell">Parameters</th>
67+
</tr>
68+
</thead>
69+
70+
<tr class="docs-api-method-parameter-row">
71+
<td class="docs-api-method-parameter-cell">
72+
<p class="docs-api-method-parameter-name">
73+
html</p>
74+
<code class="docs-api-method-parameter-type">string</code>
75+
</td>
76+
<td class="docs-api-method-parameter-description-cell">
77+
<p class="docs-api-method-parameter-description">
78+
79+
</p>
80+
</td>
81+
</tr>
82+
<thead>
83+
<tr class="docs-api-method-returns-header-row">
84+
<th colspan="2" class="docs-api-method-returns-header-cell">Returns</th>
85+
</tr>
86+
</thead>
87+
<tr>
88+
<td class="docs-api-method-returns-type-cell">
89+
<code class="docs-api-method-returns-type">TrustedHTML</code>
90+
</td>
91+
<td class="docs-api-method-returns-description-cell">
92+
<p class="docs-api-method-returns-description">
93+
94+
</p>
95+
</td>
96+
</tr></table>
97+
98+
99+
</div>

package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@angular/components-examples",
3-
"version": "21.1.0-next.0+sha-c63d735",
3+
"version": "21.1.0-next.0+sha-1d42431",
44
"description": "Angular Components Examples",
55
"private": true,
66
"repository": {
@@ -283,15 +283,15 @@
283283
},
284284
"homepage": "https://github.com/angular/components#readme",
285285
"peerDependencies": {
286-
"@angular/aria": "21.1.0-next.0+sha-c63d735",
287-
"@angular/cdk": "21.1.0-next.0+sha-c63d735",
288-
"@angular/cdk-experimental": "21.1.0-next.0+sha-c63d735",
286+
"@angular/aria": "21.1.0-next.0+sha-1d42431",
287+
"@angular/cdk": "21.1.0-next.0+sha-1d42431",
288+
"@angular/cdk-experimental": "21.1.0-next.0+sha-1d42431",
289289
"@angular/core": "^21.0.0-0 || ^21.1.0-0 || ^21.2.0-0 || ^21.3.0-0 || ^22.0.0-0",
290290
"@angular/common": "^21.0.0-0 || ^21.1.0-0 || ^21.2.0-0 || ^21.3.0-0 || ^22.0.0-0",
291-
"@angular/material": "21.1.0-next.0+sha-c63d735",
292-
"@angular/material-experimental": "21.1.0-next.0+sha-c63d735",
293-
"@angular/material-luxon-adapter": "21.1.0-next.0+sha-c63d735",
294-
"@angular/material-date-fns-adapter": "21.1.0-next.0+sha-c63d735"
291+
"@angular/material": "21.1.0-next.0+sha-1d42431",
292+
"@angular/material-experimental": "21.1.0-next.0+sha-1d42431",
293+
"@angular/material-luxon-adapter": "21.1.0-next.0+sha-1d42431",
294+
"@angular/material-date-fns-adapter": "21.1.0-next.0+sha-1d42431"
295295
},
296296
"devDependencies": {
297297
"@angular/aria": "workspace:*",

0 commit comments

Comments
 (0)