Skip to content

Conversation

@thet
Copy link
Member

@thet thet commented Dec 7, 2022

No description provided.

thet added 4 commits December 7, 2022 11:48
…probmel.

Warn about a problem of dom.template with a Content-Security-Policy set.
If a CSR rule is set then dom.template would break the code unless
'unsafe-eval' is allowed (which you wouldn't normally allow when using a CSR).
Therefore it is not recommended to use this template function.
This is a breaking change.

Due to a Content-Security-Policy problem with dom.template when
unsafe-eval is not set - which you wouldn't set if possible - we had to
remove the error-template parameter. Instead the template is now defined
in a error_template method on the Patten class and can be customized by
subclassing and extending the pat-validation pattern or by patching it
via Pattern.prototype.
Do not use dom.template for the wrapper template to not get caught by
the browser's Content-Security-Policy. If set, a unsafe-eval error would
be thrown and the pattern refuse to run.
@thet thet merged commit a9ba471 into master Dec 7, 2022
@thet thet deleted the fix-csr-problem branch December 7, 2022 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants