Skip to content
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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

jaulz
Copy link

@jaulz jaulz commented Oct 25, 2023

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

`${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

Avoid automated semicolon insertion (96% of all statements in
the enclosing function
have an explicit semicolon).
@jaulz
Copy link
Author

jaulz commented Jan 11, 2024

@MadCcc is there any chance to merge this? 😊

@aso1datov
Copy link

aso1datov commented Sep 2, 2024

@MadCcc could you please verify an merge this?

@MadCcc
Copy link
Member

MadCcc commented Sep 3, 2024

We need some test for it.

@aso1datov
Copy link

@jaulz could you please add some tests for it?

@jaulz
Copy link
Author

jaulz commented Sep 3, 2024

@aso1datov I don't have the capacity right now. Feel free to pull my branch and extend it if you need it urgently.

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.

3 participants