Inline HTML violating CSP
Inline HTML violating CSP
srosam
Posts: 2Questions: 1Answers: 0
in _fnApplyToChildren there is a style being applied to a div that's generated in the javascript.
style="height:0;overflow:hidden;"
height 0 and overflow hidden are also set in the dataTables_sizing CSS class.
Are both needed?
I have removed the in-line ones to stop the CSP errors however can anyone tell me if the inline ones are actually needed?
Thanks.
This discussion has been closed.
Answers
Forgive my ignorance, what is CSP?
Allan
no problem. im new to it too.. its Content Security Policy
Helps to prevent cross site scripting attacks (XSS)
https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP
Thanks for the link. I'm not quite clear on how the inline styles trigger any issues with it though?
The style you mention is used to ensure that the styling required for scrolling is applied. It could be done in a stylesheet for certain - but this was a way to make sure that it did happen since it is required for correct rendering (at least in some browsers!).
Allan