[wp-trac] [WordPress Trac] #10563: Text widget adds extra slashes when edited by someone without the unfiltered_html capability

WordPress Trac wp-trac at lists.automattic.com
Sun Aug 9 23:20:03 UTC 2009


#10563: Text widget adds extra slashes when edited by someone without the
unfiltered_html capability
--------------------------+-------------------------------------------------
 Reporter:  jamescollins  |        Owner:  azaozz  
     Type:  defect (bug)  |       Status:  reopened
 Priority:  normal        |    Milestone:  2.9     
Component:  Widgets       |      Version:  2.8     
 Severity:  normal        |   Resolution:          
 Keywords:  has-patch     |  
--------------------------+-------------------------------------------------

Comment(by jamescollins):

 Replying to [comment:4 Denis-de-Bernardy]:
 > The patch that got applied seems wrong. wp_filter_post_kses() expects
 slashed data, and we're feeding it unslashed data.

 The logic for my patch was taken from [10802]. If you look this changeset,
 line 403 (in r10801) was effectively replaced with line 354 (in r10802).

 According to http://core.trac.wordpress.org/browser/trunk/wp-
 includes/kses.php#L1064, the wp_filter_post_kses() function strips
 slashes, KSES filters, then adds the slashes again.

 The change in WPMU has been running on our WPMU installs for a few weeks
 and it seems to have fixed the problem.

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


More information about the wp-trac mailing list