[wp-trac] [WordPress Trac] #18446: Widget removes fields w/ default HTML on initial save in IE8 and 9

WordPress Trac wp-trac at lists.automattic.com
Wed Aug 17 02:10:10 UTC 2011


#18446: Widget removes fields w/ default HTML on initial save in IE8 and 9
------------------------------------+------------------------------
 Reporter:  layotte                 |       Owner:
     Type:  defect (bug)            |      Status:  new
 Priority:  normal                  |   Milestone:  Awaiting Review
Component:  Widgets                 |     Version:  3.2.1
 Severity:  normal                  |  Resolution:
 Keywords:  dev-feedback has-patch  |
------------------------------------+------------------------------
Changes (by SergeyBiryukov):

 * keywords:  dev-feedback => dev-feedback has-patch


Comment:

 Apparently IE uses unencoded values in DOM, in spite of `esc_attr()`:
 {{{
 <INPUT value='<a href="%URL%">%TITLE% (%TIME%)</a>' ...
 }}}
 There's a regular expression in `widgets.dev.js` which replaces `__i__`
 with a proper number:
 http://core.trac.wordpress.org/browser/tags/3.2.1/wp-
 admin/js/widgets.dev.js#L122

 In IE, it fails on fields with HTML values, and they end up in a separate
 array on POST:
 {{{
 [widget-ft_cal_event_list] => Array
     (
         [5] => Array
             (
                 [title] =>
                 [calendars] => all
                 [number_of] => 1
                 [date_types] => Month
                 [limit] => 0
                 [timeformat] => H:i
                 [dateformat] => jS
                 [date_template] => %DATE%
                 [monthformat] => F Y
                 [month_template] => %MONTH%
             )

         [__i__] => Array
             (
                 [event_template] => <a href="%URL">%TITLE% (%TIME%)/a>
             )

     )
 }}}

 [attachment:18446.patch] is an attempt to fix this.

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


More information about the wp-trac mailing list