I’ve created a form for search results:
<form id="searchForm" action="<?php echo JRoute::_('index.php?option=com_new');?>" method="get">
<fieldset class="word">
<label for="search-searchword">
<?php echo Word; ?>
</label>
<input type="text" name="<?php echo JRoute::_('index.php?option=com_new');?>searchword" id="search-searchword" size="30" value="<?php echo $this->escape($this->origkeyword); ?>" class="inputbox" />
<button name="Search" onclick="this.form.submit()" class="button"><?php echo Submit;?></button>
<input type="hidden" name="task" value="search" />
</fieldset>
the url I get is:
/index.php?%2Fsearch%2Findex.php%3Foption%3Dcom_newsearchword=&Search=&task=search
A URL consists of several parts, like subdomain, domain, path, url parameters. For all these parts you have certain rules. One rule says: you may not have certain characters in a URL parameters. Especially not characters that are used to describe the parameters itself like:
So these characters have to be encoded. And that is what you see. If you need to get the first (unnamed) url parameter and then decode that.
This might be of some help:
http://php.net/manual/en/function.urldecode.php