Replace spaces with + signs in download url after decode

This commit is contained in:
Coen Jacobs 2012-04-24 16:10:53 +02:00
parent adf28c1633
commit 443e437f88
1 changed files with 1 additions and 1 deletions

View File

@ -797,7 +797,7 @@ function woocommerce_download_product() {
$download_file = (int) urldecode($_GET['download_file']); $download_file = (int) urldecode($_GET['download_file']);
$order_key = urldecode( $_GET['order'] ); $order_key = urldecode( $_GET['order'] );
$email = urldecode( $_GET['email'] ); $email = str_replace( ' ', '+', urldecode( $_GET['email'] ) );
if (!is_email($email)) : if (!is_email($email)) :
wp_die( __('Invalid email address.', 'woocommerce') . ' <a href="'.home_url().'">' . __('Go to homepage &rarr;', 'woocommerce') . '</a>' ); wp_die( __('Invalid email address.', 'woocommerce') . ' <a href="'.home_url().'">' . __('Go to homepage &rarr;', 'woocommerce') . '</a>' );