If mailto: string isn't double URL encoded, the values don't correctly get
[squirrelmail.git] / src / redirect.php
index 83bec69075c22cf1813fc0394c461ecbf5ad6925..9a9a0086d37dce76a0ba4077f8eb2bf73a87c454 100644 (file)
@@ -141,7 +141,7 @@ if ( sqgetGlobalVar('session_expired_location', $session_expired_location, SQ_SE
 }
 if($mailto != '') {
     $redirect_url  = $location . '/webmail.php?right_frame=compose.php&mailto=';
-    $redirect_url .= $mailto;
+    $redirect_url .= urlencode($mailto);
 }
 
 /* Write session data and send them off to the appropriate page. */
@@ -176,4 +176,4 @@ function attachment_common_parse($str, $debug) {
     sqsession_register($attachment_common_types, 'attachment_common_types');
 }
 
-?>
\ No newline at end of file
+?>