Ready to get started?Download WordPress


WordPress mangling HTML (8 posts)

  1. DaveHope
    Posted 7 years ago #

    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:



  2. Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

    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.

  3. tyost
    Posted 7 years ago #

    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/). That way I can put the common routines in a directory and just include them.

  4. Ryan Paul
    Posted 7 years ago #

    You could use the FCUK editor plugin. That works html perfectly... not sure how other plugins integrate with it though.

  5. DaveHope
    Posted 7 years ago #

    Hrm, thanks for the replies guys.

    I think I'll file it as a bug, as this probably need addressing?

  6. Ben Tremblay
    Posted 7 years ago #

    From others' comments in other threads 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.

  7. Ben Tremblay
    Posted 7 years ago #

    Addendum (got caught by "post too old"):
    In "How to stop TinyMCE from pulling MS styles from Word docs" azaozz points to a potent functionality:
    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.

  8. here
    Posted 7 years ago #

Topic Closed

This topic has been closed to new replies.

About this Topic