Opened 11 years ago
Closed 11 years ago
#30546 closed defect (bug) (duplicate)
Text mode to Visual mode looses attributes
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.0.1 |
Component: | Editor | Keywords: | |
Focuses: | Cc: |
Description
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/I2_den_sub.cub.xyz;isosurface colour red blue wp-content/uploads/2014/11/I2_den_sub.cub.jvxl translucent;');" src="http://www.ch.ic.ac.uk/rzepa/blog/wp-content/uploads/2014/11/I2+.jpg" 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)
#2
@
11 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.
Switching to visual mode usually indicates something happening in the Editor component. :) Someone in that area can better review this.