Add URL encoding to toggle_mobile parameter

This commit is contained in:
Hypolite Petovan 2018-11-10 08:55:48 -05:00
parent d4a02dc314
commit 09c94dba86

View file

@ -787,9 +787,9 @@ class App
*/ */
if ($this->is_mobile || $this->is_tablet) { if ($this->is_mobile || $this->is_tablet) {
if (isset($_SESSION['show-mobile']) && !$_SESSION['show-mobile']) { if (isset($_SESSION['show-mobile']) && !$_SESSION['show-mobile']) {
$link = 'toggle_mobile?address=' . curPageURL(); $link = 'toggle_mobile?address=' . urlencode(curPageURL());
} else { } else {
$link = 'toggle_mobile?off=1&address=' . curPageURL(); $link = 'toggle_mobile?off=1&address=' . urlencode(curPageURL());
} }
$this->page['footer'] .= Core\Renderer::replaceMacros(Core\Renderer::getMarkupTemplate("toggle_mobile_footer.tpl"), [ $this->page['footer'] .= Core\Renderer::replaceMacros(Core\Renderer::getMarkupTemplate("toggle_mobile_footer.tpl"), [
'$toggle_link' => $link, '$toggle_link' => $link,