PlasmoHQ / plasmo

🧩 The Browser Extension Framework
https://www.plasmo.com
MIT License
10.52k stars 366 forks source link

[BUG] This document requires 'TrustedHTML' assignment. #807

Closed anuoua closed 12 months ago

anuoua commented 1 year ago

What happened?

Error when use Content Script UI on google play

image

innerHTML is blocked by CSP

image

image

Version

Latest

What OS are you seeing the problem on?

MacOSX

What browsers are you seeing the problem on?

Chrome

Relevant log output

This document requires 'TrustedHTML' assignment.

------

Your site tries to use a plain string in a DOM modification where a Trusted Type is expected. Requiring Trusted Types for DOM modifications helps to prevent cross-site scripting attacks.
To solve this, provide a Trusted Type to all the DOM modifications listed below. You can convert a string into a Trusted Type by:
defining a policy and using its corresponding createHTML, createScript or createScriptURL function.
defining a policy named default which will be automatically called.

(OPTIONAL) Contribution

Code of Conduct

anuoua commented 12 months ago

Merged! thx

louisgv commented 12 months ago

@anuoua I'm cutting a release, will take a bit till it's live!