[wp-trac] [WordPress Trac] #7952: Gallery Insertion Code not XHTML 1.0 Strict Compliant

WordPress Trac wp-trac at lists.automattic.com
Thu Oct 23 16:12:33 GMT 2008


#7952: Gallery Insertion Code not XHTML 1.0 Strict Compliant
---------------------+------------------------------------------------------
 Reporter:  Stoick   |       Owner:                       
     Type:  defect   |      Status:  new                  
 Priority:  normal   |   Milestone:  2.8                  
Component:  Gallery  |     Version:                       
 Severity:  normal   |    Keywords:  XHTML, W3C, Standards
---------------------+------------------------------------------------------
 I noticed a problem with the gallery insertion code that prevents strict
 XHTML web sites from validating and was hoping it could be fixed in an
 upcoming release. WordPress has been supportive of standards based design
 and this error seems like a small oversight.

 The problem exists because in strict XHTML, internal style sheets may only
 be used in the <head> of a document.


 {{{
 <style type="text/css">
 .gallery{margin: auto;}
 .gallery-item{float: left;margin-top: 10px;text-align: center;width: 33%;}
 .gallery img{border: 2px solid #cfcfcf;}
 .gallery-caption{margin-left: 0px;}
 </style>
 }}}


 Whenever a Gallery is inserted automatically into a post though, it
 inserts this code into the site as well - into the body of the document.

 The fix is to remove the code insertion and stick it into the style sheet
 itself. The problem is that the insertion code is buried in:

     /wp-includes/media.php

 It is not inside of the wp-content/themes directory which makes it likely
 that users would rewrite over this code anyway when updating. This
 insertion code should not exist in its current form.

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


More information about the wp-trac mailing list