microsoft / AdaptiveCards

A new way for developers to exchange card content in a common and consistent way.
https://adaptivecards.io
MIT License
1.75k stars 550 forks source link

[JS render] Trusted-types for adaptivecards-designer #7842

Open licanhua opened 2 years ago

licanhua commented 2 years ago

Part of the changes are drafted, and then reverted in #7819

Edit the html directly from developer's tool provided by brower.

  <meta http-equiv="Content-Security-Policy" content="require-trusted-types-for 'script';" />

TT docs: https://developer.mozilla.org/en-US/docs/Web/API/Trusted_Types_API A Guide to TT: https://web.dev/trusted-types/ TT w3c spec: https://w3c.github.io/webappsec-trusted-types/dist/spec/

fileNote.innerHTML =
            `By using the upload feature you agree to our <a href=${privacyLink} target='_blank'><span class='link'> image usage policy</span></a>`;

And possible fix

image

licanhua commented 2 years ago

may consider update adaptivecards too in

image