diff --git a/wordpress.org/public_html/wp-content/mu-plugins/pub/wporg-redirects.php b/wordpress.org/public_html/wp-content/mu-plugins/pub/wporg-redirects.php index 5a6a54a..0f65456 100644 --- a/wordpress.org/public_html/wp-content/mu-plugins/pub/wporg-redirects.php +++ b/wordpress.org/public_html/wp-content/mu-plugins/pub/wporg-redirects.php @@ -11,8 +11,8 @@ exit; // WordPress.org does not have a specific site search, only the global WordPress.org search - } elseif ( is_search() ) { - wp_safe_redirect( '/search/' . urlencode( get_query_var('s') ), 301 ); + } elseif ( ! empty( $_GET['s'] ) && false === strpos( $_SERVER['REQUEST_URI'], '/search/' ) ) { + wp_safe_redirect( '/search/' . urlencode( wp_unslash( $_GET['s'] ) ) . '/', 301 ); exit; } elseif ( is_404() ) {