Skip to content

Commit eee2ef7

Browse files
committed
Update comment in test
1 parent 7e3b94c commit eee2ef7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/@glimmer-workspace/integration-tests/test/trusted-html-test.ts

+4
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ export class TrustedHTMLTests extends RenderTest {
4040
return policy?.createHTML(html);
4141
});
4242

43+
// To keep rendering behavior consistent with SafeString
44+
// trustedHTML is not encoded or decoded in attribute value context.
45+
// It is set as string, that means result value can contain HTML enitites.
46+
// TrustedHTML value must not escape from HTML attribute value context to prevent XSS.
4347
this.render('<a title="{{trustedHTML}}">{{trustedHTML}}</a>');
4448
this.assertHTML('<a title="<b>test\'&quot;&amp;quot;</b>"><b>test\'""</b></a>');
4549
this.assertStableRerender();

0 commit comments

Comments
 (0)