From c1e0bd72af66ad04936ed80dfd4e04de7e8375a0 Mon Sep 17 00:00:00 2001 From: azaozz Date: Mon, 14 Dec 2009 10:09:55 +0000 Subject: [PATCH] Urlencode the search query in get_search_feed_link() and get_search_comments_feed_link(), props tenpura, fixes #11153 git-svn-id: http://svn.automattic.com/wordpress/trunk@12395 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/link-template.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/wp-includes/link-template.php b/wp-includes/link-template.php index 6c0a7dda7e..4a1787dbac 100644 --- a/wp-includes/link-template.php +++ b/wp-includes/link-template.php @@ -619,9 +619,9 @@ function edit_tag_link( $link = '', $before = '', $after = '', $tag = null ) { */ function get_search_feed_link($search_query = '', $feed = '') { if ( empty($search_query) ) - $search = esc_attr(get_search_query()); + $search = esc_attr( urlencode(get_search_query()) ); else - $search = esc_attr(stripslashes($search_query)); + $search = esc_attr( urlencode(stripslashes($search_query)) ); if ( empty($feed) ) $feed = get_default_feed(); @@ -644,9 +644,9 @@ function get_search_feed_link($search_query = '', $feed = '') { */ function get_search_comments_feed_link($search_query = '', $feed = '') { if ( empty($search_query) ) - $search = esc_attr(get_search_query()); + $search = esc_attr( urlencode(get_search_query()) ); else - $search = esc_attr(stripslashes($search_query)); + $search = esc_attr( urlencode(stripslashes($search_query)) ); if ( empty($feed) ) $feed = get_default_feed();