Title: WordPress mangling HTML
Last modified: August 18, 2016

---

# WordPress mangling HTML

 *  [DaveHope](https://wordpress.org/support/users/davehope/)
 * (@davehope)
 * [18 years, 6 months ago](https://wordpress.org/support/topic/wordpress-mangling-html/)
 * I’m trying to embed some flash to a page on my site, I’m entering the correct
   <object> & <enbed> code into the page, which displays fine.
 * However, If I goto edit the page at a later date the code gets mangled, wordpress
   inserts a </object> before the <embed> and replaces me closing /> with ></embed
   >
 * This is a real pain, as it means I have to re-edit my flash every time i alter
   the page.
 * Is there a tag to prevent wordpress altering html, or should this be reported
   as a bug? – I’m guessing the html tidy process doesn’t like <object> & <embed
   >
 * For reference, the page in question can be seen here:
 * [http://davehope.co.uk/gallery/](http://davehope.co.uk/gallery/)
 * Dave

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

 *  Moderator [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * (@otto42)
 * WordPress.org Admin
 * [18 years, 6 months ago](https://wordpress.org/support/topic/wordpress-mangling-html/#post-651298)
 * Turn off the visual editor entirely, then it won’t mangle that sort of thing 
   when you edit the post.
 * The option is at Users->My Profile.
 *  [tyost](https://wordpress.org/support/users/tyost/)
 * (@tyost)
 * [18 years, 6 months ago](https://wordpress.org/support/topic/wordpress-mangling-html/#post-651305)
 * I noticed this too with some javascript.
    I’ve decided to use the “Include Me
   In That HTML” plugin ([http://wordpress.org/extend/plugins/include-me-in-that-html/](http://wordpress.org/extend/plugins/include-me-in-that-html/)).
   That way I can put the common routines in a directory and just include them.
 *  [OthelloBloke](https://wordpress.org/support/users/othellobloke/)
 * (@othellobloke)
 * [18 years, 6 months ago](https://wordpress.org/support/topic/wordpress-mangling-html/#post-651315)
 * You could use the FCUK editor plugin. That works html perfectly… not sure how
   other plugins integrate with it though.
 *  Thread Starter [DaveHope](https://wordpress.org/support/users/davehope/)
 * (@davehope)
 * [18 years, 6 months ago](https://wordpress.org/support/topic/wordpress-mangling-html/#post-651390)
 * Hrm, thanks for the replies guys.
 * I think I’ll file it as a bug, as this probably need addressing?
 *  [Bentrem](https://wordpress.org/support/users/bentrem/)
 * (@bentrem)
 * [18 years, 5 months ago](https://wordpress.org/support/topic/wordpress-mangling-html/#post-651543)
 * From [others’ comments in other threads](http://wordpress.org/support/topic/146943)
   it’s clear that TinyMCE imposes its will on the simplest of markup, paragraph
   and line-breaks. From this material here the wee beast evidently doesn’t restrict
   itself to re-writing just the basics!
 * FWIW I’m cobbling together [a page relating to this *nasty rotten cussed* editor issue](http://codex.wordpress.org/User:Bentrem/EditorScratch).
 *  [Bentrem](https://wordpress.org/support/users/bentrem/)
 * (@bentrem)
 * [18 years, 5 months ago](https://wordpress.org/support/topic/wordpress-mangling-html/#post-651544)
 * Addendum (got caught by “post too old”):
    In “[How to stop TinyMCE from pulling MS styles from Word docs](http://wordpress.org/support/topic/135126)”
   azaozz points to a potent functionality: [ Rich Text Editor Filters](http://codex.wordpress.org/Plugin_API/Filter_Reference#Rich_Text_Editor_Filters)
   states “mce_valid_elements – applied to the comma-delimited list of valid HTML
   tags for the rich editor. Any elements not in this list will automatically be
   removed …” and then *sigh* points to [a TinyMCE doc that is 404 at the moment](http://tinymce.moxiecode.com/tinymce/docs/option_valid_elements.html).
 *  [here](https://wordpress.org/support/users/here/)
 * (@here)
 * [18 years, 5 months ago](https://wordpress.org/support/topic/wordpress-mangling-html/#post-651548)
 * Further codex work : [http://codex.wordpress.org/How_Wordpress_Processes_Entry_Text](http://codex.wordpress.org/How_Wordpress_Processes_Entry_Text)

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

The topic ‘WordPress mangling HTML’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 7 replies
 * 6 participants
 * Last reply from: [here](https://wordpress.org/support/users/here/)
 * Last activity: [18 years, 5 months ago](https://wordpress.org/support/topic/wordpress-mangling-html/#post-651548)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
