How to avoid that Drupal encodes my url I use hook_url_outbound_alter to change my url to /q=anything, but the url in browser is shown as /q%3Danything. How can I avoid that Drupal encodes the url? 

Other choice would be to send q=anything as query, but then hook_url_outbound_alter includes the "?" character, and I can't include it.

if (preg_match('|^search/node/(.*)|', $path, $matches)) {
  $path = 'q=' . $matches[1];
}


Any idea? Thanks in advance.
you shouldn't need to add the "q=" drupal will deal with that side of things, especially when you turn on clean urls.