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

Remove inline onclick in components/cookiebanner/dismiss.htm #75

Open
wordshop-git opened this issue Sep 30, 2020 · 2 comments
Open

Remove inline onclick in components/cookiebanner/dismiss.htm #75

wordshop-git opened this issue Sep 30, 2020 · 2 comments

Comments

@wordshop-git
Copy link

wordshop-git commented Sep 30, 2020

<div class="gdpr-banner__dismiss">
    <button role="button" 
      tabindex="0" 
      aria-pressed="false"
      class="gdpr-banner__button--dismiss"
      onclick="document.querySelector('.gdpr-banner').remove()">&times;</button>
</div>

Could we change the above code to remove the onclick="" so we can more easily implement a good CSP with this plugin?

@tobias-kuendig
Copy link
Member

You can easily override this partial and use whatever method you want to remove the banner on click. That's what partials are there for 😉

@wordshop-git
Copy link
Author

You can easily override this partial and use whatever method you want to remove the banner on click. That's what partials are there for 😉

That's what I did. But you guys make a CSP plugin would you not prefer your own plugins to work without having to run unsafe-inline ;)

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

No branches or pull requests

1 participant