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
This commit is contained in:
azaozz 2009-12-14 10:09:55 +00:00
parent 6c4c879f50
commit c1e0bd72af
1 changed files with 4 additions and 4 deletions

View File

@ -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();