Title: Automatic re code html
Last modified: August 21, 2016

---

# Automatic re code html

 *  [TTBoS](https://wordpress.org/support/users/ttbos/)
 * (@ttbos)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/automatic-re-code-html/)
 * Hi,
 * Why when I enter the code in the text box after the change in the visual some
   parts of code are Change by WP?
 * For example,
 * `<img onmouseover="this.src='http://tristram.net.pl/wp-content/uploads/2014/01/
   poradnik-do-diablo-iii-on.jpg';" onmouseout="this.src='http://tristram.net.pl/
   wp-content/uploads/2014/01/poradnik-do-diablo-iii-off.jpg';" src="http://tristram.
   net.pl/wp-content/uploads/2014/01/poradnik-do-diablo-iii-off.jpg" alt="/diablo
   3/" height="79" width="241"></a>`
 * WP turns on:
 * `<img src="http://tristram.net.pl/wp-content/uploads/2014/01/poradnik-do-diablo-
   iii-off.jpg" alt="/diablo 3/" width="241" height="79" />`
 * wtf ? :< Where I can disable this options to correct the html code?

Viewing 8 replies - 1 through 8 (of 8 total)

 *  Moderator [Jan Dembowski](https://wordpress.org/support/users/jdembowski/)
 * (@jdembowski)
 * Forum Moderator and Brute Squad
 * [12 years, 1 month ago](https://wordpress.org/support/topic/automatic-re-code-html/#post-4818457)
 * The visual editor will wreck HTML code when inserted by hand that way even if
   you use the Text box. You can try to disable the visual editor in your profile
   but that may not be an attractive solution.
 * Is it all links that you want to do that or only some?
 *  Thread Starter [TTBoS](https://wordpress.org/support/users/ttbos/)
 * (@ttbos)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/automatic-re-code-html/#post-4818462)
 * On the website I have a lot of such links with pictures where I use onmouseover
   and onmouseout
 * For example [http://tristram.net.pl/dziennik-diablo-iii/](http://tristram.net.pl/dziennik-diablo-iii/)
 * [http://tristram.net.pl/podstawy/](http://tristram.net.pl/podstawy/) etc.
 * So do all of this manually will now terribly heavy.
 * But actually disable the visual mode profile gives something because the article
   code already will not change.
 * But I hope that something of this will be done in a short time, or any option
   to disable html improve because we are in 2014 and I now go back to 2000 or worse;
   p.
 *  Moderator [Jan Dembowski](https://wordpress.org/support/users/jdembowski/)
 * (@jdembowski)
 * Forum Moderator and Brute Squad
 * [12 years, 1 month ago](https://wordpress.org/support/topic/automatic-re-code-html/#post-4818475)
 * So it’s only the images that are loading from `http://tristram.net.pl/wp-content/
   uploads/` that you want that done?
 * The reason I am asking is that onmouseover and onmouseout can be added via a 
   small plugin using a filter. That way you don’t have to edit that HTML manually
   and it would be applied on all of the image links in your post that way.
 * If that’s the case then I can tonight modify a small plugin such as this one 
   [http://pastebin.com/7dXbUNGw](http://pastebin.com/7dXbUNGw) and use the `img
   src` for your site instead.
 * WordPress filters are one of my favorite features. 😉
 *  Thread Starter [TTBoS](https://wordpress.org/support/users/ttbos/)
 * (@ttbos)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/automatic-re-code-html/#post-4818483)
 * Yes all the pictures are from the path `http://tristram.net.pl/wp-content/uploads/`
   but just do not know if this has any meaning, because they are still divided 
   into years and months, for example, `http://tristram.net.pl/wp-content/uploads/
   2014/01/` or `http://tristram.net.pl/wp-content/uploads/2013/08/` etc.
 * Of course, if only it will help 🙂 and thank you very much for your help :).
 *  Moderator [Jan Dembowski](https://wordpress.org/support/users/jdembowski/)
 * (@jdembowski)
 * Forum Moderator and Brute Squad
 * [12 years, 1 month ago](https://wordpress.org/support/topic/automatic-re-code-html/#post-4818490)
 * Not a problem as I’ve said filters are my favorite feature. Everyone should play
   with small plugins like that, it’s a great way to learn. 😉
 * I’ll post the code here and an explanation of how and why it works (or doesn’t
   work) tonight.
 *  Moderator [Jan Dembowski](https://wordpress.org/support/users/jdembowski/)
 * (@jdembowski)
 * Forum Moderator and Brute Squad
 * [12 years, 1 month ago](https://wordpress.org/support/topic/automatic-re-code-html/#post-4818645)
 * Hrm. It’s actually more complicated then I first believed and I’ll have to give
   this some more thought.
 * I had misunderstood the `<img src="...` part and I think a short code may work
   out better. But that’s a different problem and I’ll give that solution more thought.
 * It’s a challenge alright. 😉
 *  Thread Starter [TTBoS](https://wordpress.org/support/users/ttbos/)
 * (@ttbos)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/automatic-re-code-html/#post-4818686)
 * hmm not be possible to convert the TinyMCE 4.0 to not remove the onmouseover 
   and onmouseout code? or where can I report this bug?
 * Because now I know for the 99% that the fault lies with TinyMCE 4.0.
 * And I think that making a script can be very difficult to do and extremely time
   consuming.
 *  Thread Starter [TTBoS](https://wordpress.org/support/users/ttbos/)
 * (@ttbos)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/automatic-re-code-html/#post-4818692)
 * I received a reply regarding the onmouseover and onmouseout that is already in
   WP no it never will work fine, at least when it comes to official updates.
 * “_These attributes are insecure and thus will always be stripped out (in any
   
   version of WordPress) unless you have the ability to post unfiltered HTML. This
   capability is usually reserved for users of the Editor and Administrator role.“
 * ;/

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Automatic re code html’ is closed to new replies.

## Tags

 * [code](https://wordpress.org/support/topic-tag/code/)
 * [html](https://wordpress.org/support/topic-tag/html/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 8 replies
 * 2 participants
 * Last reply from: [TTBoS](https://wordpress.org/support/users/ttbos/)
 * Last activity: [12 years, 1 month ago](https://wordpress.org/support/topic/automatic-re-code-html/#post-4818692)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
