Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#30546 closed defect (bug) (duplicate)

Text mode to Visual mode looses attributes

Reported by: hrzepa's profile hrzepa Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.0.1
Component: Editor Keywords:
Focuses: Cc:


A string of the type <img class="aligncenter size-full wp-image-13086" onclick="jmolInitialize('../Jmol/');jmolSetAppletColor('white');jmolApplet([500,500],'load wp-content/uploads/2014/11/;isosurface colour red blue wp-content/uploads/2014/11/I2_den_sub.cub.jvxl translucent;');" src="" alt="halogen-search1" width="400" />

would retain the onclick attributed of the <img> element in V3 of WP, but now if it is inserted in text view mode, this attribute is deleted when switching to visual mode.

Can the old behaviour be reinstated please.

Change History (2)

#1 @miqrogroove
9 years ago

  • Component changed from Formatting to Editor

Switching to visual mode usually indicates something happening in the Editor component. :) Someone in that area can better review this.

#2 @dd32
9 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

This changed when we upgraded to TinyMCE 4 in WordPress 3.9.
TinyMCE strips all on* attributes for security reasons, in #27858 we've opted to leave them stripped, allowing for a plugin to re-enable them if need be.

Note: See TracTickets for help on using tickets.