From 1c934d962c7da3149f41bd9b321f6e5b8f3cbd58 Mon Sep 17 00:00:00 2001 From: Mark Jaquith Date: Sat, 22 Sep 2007 06:11:48 +0000 Subject: [PATCH] Add tag_base to list of untrailingslashed options, and standardize the unslashing. Prevents /mytags//tagname/ git-svn-id: https://develop.svn.wordpress.org/trunk@6153 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index e0395ad348..f44f3a7a13 100644 --- a/wp-includes/functions.php +++ b/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) ); }