URL default encoding should match rules for href's.   VS &

This commit is contained in:
Thomas Gelf 2014-03-17 16:59:22 +01:00
parent fb948d8390
commit e964da9579
2 changed files with 2 additions and 2 deletions

View File

@ -13,7 +13,7 @@ $url = Url::fromRequest()->remove('_render')->getRelativeUrl();
$menu = Menu::fromConfig();
?>
<div id="menu" data-base-target="_main">
<form action="<?= $this->href('search') ?>" method="post">
<form action="<?= $this->href('search') ?>" method="get">
<input type="text" name="q" class="search" placeholder="Search..." autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" />
</form>
<?= $this->partial('parts/menu.phtml', array(

View File

@ -256,7 +256,7 @@ class Url
if (empty($this->params)) {
return ltrim($this->path, '/') . $this->anchor;
}
return ltrim($this->path, '/') . '?' . http_build_query($this->params) . $this->anchor;
return ltrim($this->path, '/') . '?' . http_build_query($this->params, '', '&amp;') . $this->anchor;
}
/**