[wp-trac] [WordPress Trac] #30351: Input field with HTML tag as default value

WordPress Trac noreply at wordpress.org
Tue Jan 13 13:41:48 UTC 2015


#30351: Input field with HTML tag as default value
-----------------------------+---------------------------------------------
 Reporter:  GDragoN          |       Owner:
     Type:  defect (bug)     |      Status:  closed
 Priority:  normal           |   Milestone:
Component:  Widgets          |     Version:  4.0
 Severity:  normal           |  Resolution:  duplicate
 Keywords:  reporter-        |     Focuses:  ui, javascript, administration
  feedback                   |
-----------------------------+---------------------------------------------
Description changed by SergeyBiryukov:

Old description:

> If you create a widget with INPUT field, and if default value for that
> field is a HTML tag, when adding this widget into sidebar, `__i__` for
> this INPUT is not replaced by sequential number for the widget. If the
> default value is not tag, it works fine. If after adding widget to
> sidebar you set HTML tag as value it is saved OK also. Problem is when
> field has HTML as default value.
>
> From what I can see, this is a bug that is there since the Widget class
> is added to WordPress years ago. Problem is the regular expression that
> detects __i__ inside the HTML generated for the widget control.
>
> Milan

New description:

 If you create a widget with INPUT field, and if default value for that
 field is a HTML tag, when adding this widget into sidebar, `__i__` for
 this INPUT is not replaced by sequential number for the widget. If the
 default value is not tag, it works fine. If after adding widget to sidebar
 you set HTML tag as value it is saved OK also. Problem is when field has
 HTML as default value.

 From what I can see, this is a bug that is there since the Widget class is
 added to WordPress years ago. Problem is the regular expression that
 detects `__i__` inside the HTML generated for the widget control.

 Milan

--

--
Ticket URL: <https://core.trac.wordpress.org/ticket/30351#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list