Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update trusted types policy names to remove 'allow-duplicated' #9050

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions source/nodejs/adaptivecards/src/card-elements.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
import * as Enums from "./enums";
import { CarouselEvent } from "./carousel";
Expand Down Expand Up @@ -1132,7 +1132,7 @@ export class TextBlock extends BaseTextBlock {
// Markdown processing is handled outside of Adaptive Cards. It's up to the host to ensure that markdown is safely
// processed.
private static readonly _ttMarkdownPolicy = (typeof window === 'undefined') ? undefined : window.trustedTypes?.createPolicy(
"adaptivecards#markdownPassthroughPolicy",
"adaptivecards#markdownPassthroughTrustedTypesPolicy",
{ createHTML: (value) => value }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jwoo-msft @paulcam206 Would this have an impact on other AC users?

);

Expand All @@ -1141,7 +1141,7 @@ export class TextBlock extends BaseTextBlock {
// _originalInnerHtml so that we can restore/recalculate truncation later if space availability has changed (see
// TextBlock.restoreOriginalContent())
private static readonly _ttRoundtripPolicy = (typeof window === 'undefined') ? undefined : window.trustedTypes?.createPolicy(
"adaptivecards#restoreContentsPolicy",
"adaptivecards#restoreContentsTrustedTypesPolicy",
{ createHTML: (value) => value }
);

Expand Down
Loading