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

Allowed HTML tags are stripped in gut #9291

Closed
JulioPotier opened this issue Aug 23, 2018 · 2 comments
Closed

Allowed HTML tags are stripped in gut #9291

JulioPotier opened this issue Aug 23, 2018 · 2 comments

Comments

@JulioPotier
Copy link

Describe the bug
The SCRIPT tag and javascript attributes are stripped from my content when I convert a classic bloc into a gut one.

To Reproduce
Steps to reproduce the behavior:

  1. Log in as administrator
  2. Add a new classic post and add a <script>alert(gut/)</script> tag + <p onmouseover="javascript:alert('/gut/)">enberg</p> in the content
  3. Save
  4. Edit it in gutenberg
  5. Convert your classic bloc as a gut one

Expected behavior
Since SCRIPT tags and JS attrs are allowed as administrator, gut should not strip them without any notice.

Screenshots
Classic text mode
https://www.dropbox.com/s/ii7b4j26piahj0v/Capture%20d%27%C3%A9cran%202018-08-23%2023.15.31.png?dl=0
Classic visual mode
https://www.dropbox.com/s/bkyw91yeyjuaota/Capture%20d%27%C3%A9cran%202018-08-23%2023.15.46.png?dl=0
Gut after conversion
https://www.dropbox.com/s/6igyvs0xgt7y2bf/Capture%20d%27%C3%A9cran%202018-08-23%2023.16.31.png?dl=0

Desktop (please complete the following information):

  • OS: Mac 10.11.6
  • Browser: Chrome
  • Version 68

Additional context

  • Gutenberg 3.6.2
@ZebulanStanphill
Copy link
Member

I think this is a duplicate of #6102. See also: #6878 and #7604.

@JulioPotier
Copy link
Author

My bad you're right.

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

2 participants