You better use the built-in function url()to create your url, if you pass the array as query, it processes you the url:
$options = array(
'absolute' => TRUE,
'query' => array('destination' => '/node/1')
);
$redirect = url('user/register', $options);
drupal_goto( $redirect );
drupal_encode() will encode the entire string that you pass to it, so if you want to do it your own way, it will look like this:
$redirect = 'user/register?' . drupal_urlencode("destination=/node/1");
drupal_goto( $redirect );
Clive source
share