Ticket #4120 (closed defect: fixed)

Opened 2 years ago

Last modified 1 year ago

call to clean_url() hardcoded in sanitize_comment_cookies()

Reported by: wnorris Assigned to: anonymous
Priority: low Milestone: 2.3
Component: General Version: 2.2
Severity: normal Keywords:
Cc:

Description

the method 'sanitize_comment_cookies' (wp-includes/comment.php) includes a hardcoded call to the method clean_url when working with the comment_author_url. This is unnecessary because that is already handled as a filter on pre_comment_author_url. Additionally, it makes it impossible (or rather very difficult) to NOT call clean_url.

Example use case: I have an OpenID plugin in which a user may actually be putting an i-name in the URL field (something akin to "=will.norris"). While this does have a URL form (http://xri.net/=will.norris), I need the raw form stored in the cookie. As it is now, I would have to remove the sanitize_comment_cookies filter and re-implement it without the hardcoded function call. If it were removed as I am proposing, this would be possible by simply removing the clean_url filter for pre_comment_author_url, but with no loss of functionality otherwise.

Change History

08/29/07 19:04:14 changed by ryan

  • status changed from new to closed.
  • resolution set to fixed.

(In [5975]) Remove hardcoded clean_url on comment_author_url since it is handled on the pre_comment_author_url filter. Props wnorris. fixes #4120