-
Notifications
You must be signed in to change notification settings - Fork 37
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
fix: avoid inline styles to ensure CSP compliancy #49
base: master
Are you sure you want to change the base?
Conversation
src/calculateNodeHeight.tsx
Outdated
`${sizingStyle};${HIDDEN_TEXTAREA_STYLE}`, | ||
); | ||
for (const [name, value] of Object.entries({ ...sizingStyle, ...HIDDEN_TEXTAREA_STYLE })) { | ||
hiddenTextarea.style[name] = value |
Check notice
Code scanning / CodeQL
Semicolon insertion Note
the enclosing function
@MadCcc is there any chance to merge this? 😊 |
@MadCcc could you please verify an merge this? |
We need some test for it. |
@jaulz could you please add some tests for it? |
@aso1datov I don't have the capacity right now. Feel free to pull my branch and extend it if you need it urgently. |
This fix will avoid setting inline styles and instead sets the styles directly on the element which I think should actually be the correct way of doing it. The nice side effect is that it will ensure that the
unsafe-inline
Content Security Policy will be adhered in all circumstances and hence fix this long standing issue: #14