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

Visual editor stripping IMG SRC arguments in Calypso and Gutenberg #27375

Closed
scherem opened this issue Sep 21, 2018 · 2 comments
Closed

Visual editor stripping IMG SRC arguments in Calypso and Gutenberg #27375

scherem opened this issue Sep 21, 2018 · 2 comments
Labels
[Feature] Post/Page Editor The editor for editing posts and pages. [Status] Stale

Comments

@scherem
Copy link

scherem commented Sep 21, 2018

When you make a mouseover link in the HTML editor and publish it works as expected. Soon as you switch to the visual editor, the code is stripped breaking the mouseover.

This does not happen in the WP-Admin editor.

Steps to reproduce

  1. In HTML editor use the following code:
<a href="#"><img src="First Image Address" onmouseover=this.src="Second Image Address" onmouseout=this.src="First Image Address" /></a>
  1. Switch to visual editor.
  2. Switch back to HTML editor
  3. Code is now displayed as:
    In Calypso:
<a href="#"><img src="First Image Address" /></a>

What I expected

I expect the HTML code not to change when you switch back to the visual editor or that the code is stripped out of the HTML version on save/preview.

What happened instead

The code is stripped as shown above.

Browser / OS version

Chrome

Screenshot / Video

mousover1

WP-Admin
wp-admin_view

Gutenberg:
gutenberh-test

Context / Source

We'd also love to know how you found the bug: #manual-testing, #user-report
User brought the issue into chat (6568843-hc). After testing, a ticket was made to examine further 1428593-zen.

Upon further testing, discovered that code behaves as expected in WP-Admin.

@scherem scherem changed the title Visual editor stripping IMG SRC arguments Visual editor stripping IMG SRC arguments in Calypso and Gutenberg Sep 24, 2018
@scherem
Copy link
Author

scherem commented Sep 24, 2018

Tested the issue in Gutenberg and found it existed too (but behave differently). Updated above to reflect this.

@alisterscott alisterscott added the [Feature] Post/Page Editor The editor for editing posts and pages. label Sep 26, 2018
@stale
Copy link

stale bot commented Jun 23, 2019

This issue has been marked as stale and will be closed in seven days. This happened because:

  • It has been inactive in the past 9 months.
  • It isn't a project or a milestone, and hasn’t been labeled `[Pri] Blocker`, `[Pri] High`, `[Status] Keep Open`, or `OSS Citizen`.

You can keep the issue open by adding a comment. If you do, please provide additional context and explain why you’d like it to remain open. You can also close the issue yourself — if you do, please add a brief explanation.

@stale stale bot added the [Status] Stale label Jun 23, 2019
@stale stale bot closed this as completed Jun 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Post/Page Editor The editor for editing posts and pages. [Status] Stale
Projects
None yet
Development

No branches or pull requests

2 participants