Skip to content

Commit 93f7c00

Browse files
licanhuamichaelfarnsworth
authored andcommitted
prefix adaptivecards# for ttpolicy (microsoft#7860)
1 parent 931a471 commit 93f7c00

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
@@ -1109,7 +1109,7 @@ export class TextBlock extends BaseTextBlock {
11091109
// Markdown processing is handled outside of Adaptive Cards. It's up to the host to ensure that markdown is safely
11101110
// processed.
11111111
private static readonly _ttMarkdownPolicy = window.trustedTypes?.createPolicy(
1112-
"markdownPassthroughPolicy",
1112+
"adaptivecards#markdownPassthroughPolicy",
11131113
{ createHTML: (value) => value }
11141114
);
11151115

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

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)