yes there is…
stop using that stupid visual editor.
@ivovic
I know how to write all of the html myself (obviously since I’m working to correct wordpress to make all of my posts valid markup since the embed tag is used by default and is not valid), but the problem is that when I click save/publish it always “corrects” the object tags by adding the embed tag. The only way I can get around this is to disable javascript in my browser each time I want to make a post with the object tag and avoid getting the embed tag automatically included. Or I can manually edit the mysql entries.
I was actually aiming for some help that was a little more on track. Anyone else care to help me find a way to disable the embed tag?
You shouldn’t need to disable anything.
This works perfectly fine when not “using that stupid visual editor.”
<object type='application/x-shockwave-flash' data='http://www.youtube.com/v/6mUMV-hrlHw' width='298' height='250'>
<param name='movie' value='http://www.youtube.com/v/6mUMV-hrlHw' />
<param name='FlashVars' value='playerMode=embedded' />
</object>
Kyle, you should try paying attention rather than ‘correcting’ people who are offering assistance.
Disable the visual editor and you won’t have this issue
@Ivovic
I’m not trying to correct you. The visual editor is not a problem. It generates valid html except for the embed tag. I’m trying to find out which file to edit to disable the javascript from adding the embed tag period.
I’ll disable it temperarily, but I’m still trying to find the javascript that is generating the embed tag so I can just cut that part out.
@greenshady
That is the markup that I used on my old blog. The thing is..I don’t mind the visual editor. The problem with it is all in the javascript. That can be corrected and then I would have no reason to disable the visual editor.
pardon the pasting using the windows forward slashes
Kyle, please go get a copy of wingrep, then YOU can do this the next time.
wordpress-2.5\wordpress\wp-admin\js\editor.js :
if ( content.indexOf('<object') != -1 ) {
content = content.replace(new RegExp('\\s*<param([^>]*)>\\s*', 'mg'), "<param$1>");
content = content.replace(new RegExp('\\s*</embed>\\s*', 'mg'), '</embed>');
}
wordpress-2.5\wordpress\wp-includes\formatting.php :
$pee = str_replace(array("\r\n", "\r"), "\n", $pee); // cross-platform newlines
if ( strpos($pee, '<object') !== false ) {
$pee = preg_replace('|\s*<param([^>]*)>\s*|', "<param$1>", $pee); // no pee inside object/embed
$pee = preg_replace('|\s*</embed>\s*|', '</embed>', $pee);
If you have already edited those 2 instances, then go get wingrep, and look at the other 11 files that embed shows up in.
@whooami
Thanks, this was exactly what I was after. I’ll update everyone once I find the files that fix this.