[wp-trac] [WordPress Trac] #1597: balanceTags() doesn't filter self-closing tags which shouldn't be self-closed

WordPress Trac wp-trac at lists.automattic.com
Fri Oct 15 15:49:42 UTC 2010


#1597: balanceTags() doesn't filter self-closing tags which shouldn't be self-
closed
--------------------------+-------------------------------------------------
 Reporter:  frenzie       |        Owner:  rob1n         
     Type:  defect (bug)  |       Status:  reopened      
 Priority:  normal        |    Milestone:  Future Release
Component:  Formatting    |      Version:  1.5.2         
 Severity:  minor         |   Resolution:                
 Keywords:  has-patch     |  
--------------------------+-------------------------------------------------

Comment(by coffee2code):

 I wanted to err on the side of thoroughness.  I don't believe it's the
 function's purpose to be aware of context or anything DTD-related except
 for tags that are allowed to be self-closing.  If implemented as per the
 patch, someone could conceivable use it to properly tag-balance HTML
 intended to be output in the HEAD.

 Encountering a HEAD element in the BODY is already invalid in and of
 itself, so tag-balancing those misplaced tags is at least one step in the
 direction of properness.  At the very least it does no additional harm,
 but allows the function to be used for HTML intended for the HEAD.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/1597#comment:16>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list