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/
Dave
-
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.
I noticed this too with some javascript.
I’ve decided to use the “Include Me In That HTML” plugin (http://ww.wp.xz.cn/extend/plugins/include-me-in-that-html/). That way I can put the common routines in a directory and just include them.You could use the FCUK editor plugin. That works html perfectly… not sure how other plugins integrate with it though.
Hrm, thanks for the replies guys.
I think I’ll file it as a bug, as this probably need addressing?
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.
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.Further codex work : http://codex.ww.wp.xz.cn/How_Wordpress_Processes_Entry_Text
The topic ‘WordPress mangling HTML’ is closed to new replies.