[wp-trac] Re: [WordPress Trac] #8850: WYSIWYG editor fails to
correct invalid video embed code
WordPress Trac
wp-trac at lists.automattic.com
Wed Jan 14 05:08:47 GMT 2009
#8850: WYSIWYG editor fails to correct invalid video embed code
--------------------------------------------------------+-------------------
Reporter: fd | Owner: azaozz
Type: defect (bug) | Status: new
Priority: normal | Milestone: 2.8
Component: TinyMCE | Version: 2.7
Severity: normal | Resolution:
Keywords: youtube embed tinymce editor video wysiwyg |
--------------------------------------------------------+-------------------
Changes (by fd):
* summary: WYSIWYG editor corrects invalid video embed code => WYSIWYG
editor fails to correct invalid video embed
code
Comment:
I see what you did there. How you changed the name of the bug so that it's
actually a feature. ;-)
It ''would'' be just an HTML validity issue if all it was doing was
removing the <embed> tag. But it's doing a lot more than that.
For one, ''elements and attributes'' must be lowercase but the ''value''
of an attribute does not have to be (except for attributes that have a
pre-defined set of values like the type attribute on an <input> tag).
"allowFullScreen" is a value, not an attribute, it is valid and should be
left alone.
Also, it has added data and type attributes to the (already valid) object
tag. I didn't put them there and there is no reason for them to be there.
They're optional attributes.
It ''added'' a whole extra <param> with name="src" for no good reason.
And, crucially I think, it ''deleted'' the (perfectly valid) <param> with
name="movie" pointing to the actual source of the video.
I'm going to stick with "mangling" when describing this behavior.
For what it's worth, this is the embed code handed out by YouTube and it
is going to affect a lot of 2.7 users.
--
Ticket URL: <http://trac.wordpress.org/ticket/8850#comment:2>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list