Skip to content

Commit b996636

Browse files
committed
prefix adaptivecards# for ttpolicy (#7860)
1 parent c3205ee commit b996636

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

source/nodejs/adaptivecards/src/card-elements.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1108,7 +1108,7 @@ export class TextBlock extends BaseTextBlock {
11081108
// Markdown processing is handled outside of Adaptive Cards. It's up to the host to ensure that markdown is safely
11091109
// processed.
11101110
private static readonly _ttMarkdownPolicy = window.trustedTypes?.createPolicy(
1111-
"markdownPassthroughPolicy",
1111+
"adaptivecards#markdownPassthroughPolicy",
11121112
{ createHTML: (value) => value }
11131113
);
11141114

@@ -1117,7 +1117,7 @@ export class TextBlock extends BaseTextBlock {
11171117
// _originalInnerHtml so that we can restore/recalculate truncation later if space availability has changed (see
11181118
// TextBlock.restoreOriginalContent())
11191119
private static readonly _ttRoundtripPolicy = window.trustedTypes?.createPolicy(
1120-
"restoreContentsPolicy",
1120+
"adaptivecards#restoreContentsPolicy",
11211121
{ createHTML: (value) => value }
11221122
);
11231123

source/nodejs/adaptivecards/src/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ export function truncateText(element: HTMLElement, maxHeight: number, lineHeight
190190
* TextBlock.truncateIfSupported}), but had a bug where it might actually pass through an element
191191
* for which innerHTML yielded actual HTML (since fixed).
192192
*/
193-
const ttDeprecatedPolicy = window.trustedTypes?.createPolicy("deprecatedExportedFunctionPolicy", {
193+
const ttDeprecatedPolicy = window.trustedTypes?.createPolicy("adaptivecards#deprecatedExportedFunctionPolicy", {
194194
createHTML: (value) => value
195195
});
196196

0 commit comments

Comments
 (0)