Permalink
Browse files

Add tag_base to list of untrailingslashed options, and standardize th…

…e unslashing. Prevents /mytags//tagname/

git-svn-id: http://svn.automattic.com/wordpress/trunk@6153 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information...
1 parent c005340 commit 0fb4233fdf8f3a00147bcc7724c8503b2947e06a markjaquith committed Sep 22, 2007
Showing with 2 additions and 2 deletions.
  1. +2 −2 wp-includes/functions.php
@@ -218,8 +218,8 @@ function get_option($setting) {
if ( 'home' == $setting && '' == $value )
return get_option('siteurl');
- if ( 'siteurl' == $setting || 'home' == $setting || 'category_base' == $setting )
- $value = preg_replace('|/+$|', '', $value);
+ if ( in_array($setting, array('siteurl', 'home', 'category_base', 'tag_base')) )
+ $value = untrailingslashit($value);
return apply_filters( 'option_' . $setting, maybe_unserialize($value) );
}

0 comments on commit 0fb4233

Please sign in to comment.