Opened 16 years ago
Closed 16 years ago
#11327 closed defect (bug) (wontfix)
Widgets might get null bytes in their CSS class
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 2.3 |
Component: | Widgets | Keywords: | widgets css class has-patch |
Focuses: | Cc: |
Description
When register_sidebar_widget is called with a lambda/create_function as output_callback and no/empty classname, the widget's CSS class will contain "\0lamba_123" (\0 being the null character and 123 being the actual assigned lamba id).
This bug was introduced in 2.3 by #4910 (In [6098]).
The simple fix might be to left-trim null bytes from the classname (this would fix the case for lambda's, and maybe other cases I'm not aware of)
Attachments (1)
Change History (3)
Note: See
TracTickets for help on using
tickets.
The patch looks ok, but I don't know if it's worth fixing, since you should be using the new WP_Widget class, instead of setting each handler manually.