[wp-trac] [WordPress Trac] #16416: Settings -> Privacy "block search engines" option is not accurate

WordPress Trac wp-trac at lists.automattic.com
Fri Sep 14 01:58:59 UTC 2012


#16416: Settings -> Privacy "block search engines" option is not accurate
-----------------------------------+-----------------------
 Reporter:  designsimply           |       Owner:  westi
     Type:  defect (bug)           |      Status:  accepted
 Priority:  normal                 |   Milestone:  3.5
Component:  Administration         |     Version:
 Severity:  normal                 |  Resolution:
 Keywords:  has-patch ux-feedback  |
-----------------------------------+-----------------------

Comment (by nacin):

 [attachment:16416.diff] inverts the checkbox, with the label "Ask search
 engines to <strong>not index</strong> this site".

 options.php sets $value to be null by default. It then pulls the value
 from $_POST (which can only be a string or array), trims that value if it
 is not an array, and calls stripslashes_deep() on it (which only affects
 strings, and strings inside arrays).

 The problem is that the trim occurs even if the value was not pulled from
 POST. That means null is converted to a string, and my trick doesn't work.
 A slight tweak means null can be passed to update_option(), which converts
 it to an empty string anyway, so there's no change in functionality — but,
 it provides some extra context in sanitize_option().

 How it looks: http://cl.ly/image/2C0p3M1y2f41

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


More information about the wp-trac mailing list