[wp-trac] [WordPress Trac] #4049: Wordpress 2.1.2 strips closing P tag causing xhtml validation to fail

WordPress Trac wp-trac at lists.automattic.com
Fri Mar 30 13:27:29 GMT 2007


#4049: Wordpress 2.1.2 strips closing P tag causing xhtml validation to fail
----------------------------+-----------------------------------------------
 Reporter:  jayp            |       Owner:  anonymous        
     Type:  defect          |      Status:  new              
 Priority:  high            |   Milestone:  2.1.3            
Component:  Administration  |     Version:  2.1.2            
 Severity:  normal          |    Keywords:  strip p tag xhtml
----------------------------+-----------------------------------------------
 I noticed a bug that I did not have prior to version 2.1.

 I have an object tag (flash movie) wrapped around a P tag that provides
 formatting. I'm not using the WYSIWYG editor. The code looks like this:


 {{{
 <p class="center"><object type="application/x-shockwave-flash"
 style="width:425px; height:350px"
 data="http://www.youtube.com/v/T2Bsu4z9Y3k"><param name="movie"
 value="http://www.youtube.com/v/T2Bsu4z9Y3k"></param></object></p>
 }}}

 But when Wordpress prints this out in the template, it strips the closing
 P tag and adds a few line breaks (perhaps no big deal). Viewing the source
 code reveals this:

 {{{
 <p class="center">
 <object type="application/x-shockwave-flash" style="width:425px;
 height:350px" data="http://www.youtube.com/v/T2Bsu4z9Y3k">
 <param name="movie" value="http://www.youtube.com/v/T2Bsu4z9Y3k"></param>
 </object>
 }}}

 The page no longer validates as proper xhtml. But if I save this html
 locally and add that closing P tag manually, it will validate.

 I'm quite certain this never happened before 2.1.

 This is my first time using trac so please forgive me if I've done
 something wrong. Incidentally, this issue may be somewhat related to
 [http://trac.wordpress.org/ticket/3669 Ticket 3669].

-- 
Ticket URL: <http://trac.wordpress.org/ticket/4049>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list