[wp-trac] [WordPress Trac] #35953: WordPress mess up my posts and pages when im putting html and scripts in it (was: Wordpress mess up my posts and pages when im putting html and scripts in it)
WordPress Trac
noreply at wordpress.org
Thu Feb 25 20:09:12 UTC 2016
#35953: WordPress mess up my posts and pages when im putting html and scripts in it
--------------------------+------------------------------
Reporter: rigpa1 | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Editor | Version: 4.4.2
Severity: normal | Resolution:
Keywords: close | Focuses:
--------------------------+------------------------------
Changes (by ocean90):
* keywords: => close
Old description:
> I am so sick and tired of Wordpress messing up my scripts on posts and
> pages when switching from text to visual.
>
> When I put something in there it is becaus I intend it to be there. I
> don't want Wordpress to make changes to my code!!
>
> I have this line: <td valign="top" align="left" width="100"
> height="10"><a href="infrarod-cyan" onMouseOver="
> switchimages('Bimage0',1); return true" onMouseOut="
> switchimages('Bimage0',0); return true" onClick="
> switchimages('Bimage0',2); return true"><img name="Bimage0" src="/wp-
> chili-matrix/ChiliMatch_C2_R2.jpg" width="100" height="10" border="0"
> alt=""></a></td>
>
> and it gets changed to this: <td align="left" valign="top" width="100"
> height="10"><a href="infrarod-cyan"><img src="/wp-images/com_C2_R2.jpg"
> alt="" width="100" height="10" name="Bimage0" border="0" /></a></td>
>
> Which means my mouseover stops working.
>
> It took me months to figure out that it is Wordpress (not the editor)
> that deletes my code and every time I accidentally switch from text to
> visual OR if the editor opens in text the code gets ruined.
>
> I want to be able to trust that what ever I put in there is going to STAY
> there!!!
New description:
I am so sick and tired of WordPress messing up my scripts on posts and
pages when switching from text to visual.
When I put something in there it is because I intend it to be there. I
don't want WordPress to make changes to my code!!
I have this line: <td valign="top" align="left" width="100" height="10"><a
href="infrarod-cyan" onMouseOver=" switchimages('Bimage0',1); return true"
onMouseOut=" switchimages('Bimage0',0); return true" onClick="
switchimages('Bimage0',2); return true"><img name="Bimage0" src="/wp-
chili-matrix/ChiliMatch_C2_R2.jpg" width="100" height="10" border="0"
alt=""></a></td>
and it gets changed to this: <td align="left" valign="top" width="100"
height="10"><a href="infrarod-cyan"><img src="/wp-images/com_C2_R2.jpg"
alt="" width="100" height="10" name="Bimage0" border="0" /></a></td>
Which means my mouseover stops working.
It took me months to figure out that it is WordPress (not the editor) that
deletes my code and every time I accidentally switch from text to visual
OR if the editor opens in text the code gets ruined.
I want to be able to trust that what ever I put in there is going to STAY
there!!!
--
Comment:
The visual editor is not an HTML editor. You can reproduce the issue in
the [https://www.tinymce.com/ TinyMCE editor demo] too.
If you're adding custom HTML you shouldn't use the visual editor at all.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35953#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list