Visual Editor is stripping code
-
I was editing the source URLs for embedded images in existing posts (due to a forced change of photo-host), all was going well until the “upgrade” to WP3.9, since then I’ve been having problems with the Visual Editor code-stripping.
Here’s an example…
This:
<p style="text-align: center;"><a title="" href="https://beardedgit.com/wp-content/uploads/872080579-2000x1329.jpg" target="_blank"><img onmouseover="this.src='https://beardedgit.com/wp-content/uploads/872081152-O-800x531.jpg';" onmouseout="this.src='https://beardedgit.com/wp-content/uploads/872080579-800x531.jpg';" alt="" src="https://beardedgit.com/wp-content/uploads/872080579-800x531.jpg" width="800" height="531" /></a></p>
is stripped to this:
<p style="text-align: center;"><a title="" href="https://beardedgit.com/wp-content/uploads/872080579-2000x1329.jpg" target="_blank"><img src="https://beardedgit.com/wp-content/uploads/872080579-800x531.jpg" alt="" width="800" height="531" /></a></p>
As you can see, the onmouseover and onmouseout bits have gone. Moreover, with the latest incarnation of TinyMCE, there’s no easy way to put those bits back in.
I’ve still got roughly 3000 image URLs to edit, they’re spread over about 1000 posts, and now every post edit is a nightmare instead of a simple yet boring admin job.
So, is there any way to stop the latest WP/TinyMCE from mangling my posts?
Cheers for looking, all help appreciated.
- The topic ‘Visual Editor is stripping code’ is closed to new replies.