[wp-trac] Re: [WordPress Trac] #6888: Colon in title attribute causes truncation

WordPress Trac wp-trac at lists.automattic.com
Thu May 1 03:59:16 GMT 2008


#6888: Colon in title attribute causes truncation
------------------------+---------------------------------------------------
 Reporter:  tellyworth  |        Owner:  anonymous
     Type:  defect      |       Status:  new      
 Priority:  normal      |    Milestone:  2.6      
Component:  General     |      Version:           
 Severity:  normal      |   Resolution:           
 Keywords:              |  
------------------------+---------------------------------------------------
Changes (by tellyworth):

  * summary:  A complex 'title' attribute can be truncated => Colon in
              title attribute causes truncation

Comment:

 Actually it can be trivially reproduced by any title attribute containing
 a colon.  Any text before the colon is stripped, most likely by the
 bad_protocol functions in kses.

 {{{
 1) test_the_content(WPTestAttributeColon)
 Failed asserting that two strings are equal.
 expected string <<p><span title="My friends: Alice, Bob and
 Carol">foo</span></p>>
 difference      <
 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx????????????>
 got string      <<p><span title="Alice, Bob and Carol">foo</span></p>>
 }}}

 See WPTestAttributeColon in the same wp-testcase file.

 Possible fixes: either the bad protocol filters shouldn't be applied to
 Title (if that's safe); or they should be made more specific so they only
 filter sequences that actually look like URL protocols (allowing of course
 for % and entity encoding).

-- 
Ticket URL: <http://trac.wordpress.org/ticket/6888#comment:1>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list