theme superfish menu item link add query string I need to add the destination to user/logout links in the THEME_superfish_menu_item_link preprocess function, but I am having no luck.

In template.php I have: 

function THEME_superfish_menu_item_link(array $variables) {
  if ($variables['menu_item']['link']['link_path'] == "user/logout") {
    $dest = drupal_get_destination();
    $link_path = $variables['menu_item']['link']['link_path'] . '?destination=' . $dest['destination'];
    $menu_link = l($variables['menu_item']['link']['title'], $link_path, $variables['link_options']);

    return $menu_link;
  }
}


My links end up encoded: /user/logout%3Fdestination%3Dhome

I assume query strings can be added as parameters to the $variables['menu_item'] but am unsure how.
I think your problem is in how you add the query string. Check this article: Webemania | How and why to use l() function to create links in Drupal and specifically example 6.

&lt;?php
// adding query string on example:5
print l(  t('PHP ini configuration'),  'node/33',  array('attributes' =&gt;array('class'=&gt;'php-ini-conf', 'id'=&gt;'phpini-conf'), 'query'=&gt;array('id'=&gt;'5','status'=&gt;'ok') ));
?&gt;