X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FApp.php;h=445101309384a2f651b46fd69f78b507835538a4;hb=4894e89f036be1f8a82523ac69d56ae36e7685df;hp=cf8fc7abe4c2ae2547b223a3415a04e05c39a5c3;hpb=bd972151478f40f73585519110700222a1931d44;p=friendica.git diff --git a/src/App.php b/src/App.php index cf8fc7abe4..4451013093 100644 --- a/src/App.php +++ b/src/App.php @@ -787,9 +787,9 @@ class App */ if ($this->is_mobile || $this->is_tablet) { if (isset($_SESSION['show-mobile']) && !$_SESSION['show-mobile']) { - $link = 'toggle_mobile?address=' . curPageURL(); + $link = 'toggle_mobile?address=' . urlencode(curPageURL()); } 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"), [ '$toggle_link' => $link, @@ -816,12 +816,12 @@ class App public function removeBaseURL($origURL) { // Remove the hostname from the url if it is an internal link - $nurl = normalise_link($origURL); - $base = normalise_link($this->getBaseURL()); + $nurl = Util\Strings::normaliseLink($origURL); + $base = Util\Strings::normaliseLink($this->getBaseURL()); $url = str_replace($base . '/', '', $nurl); // if it is an external link return the orignal value - if ($url == normalise_link($origURL)) { + if ($url == Util\Strings::normaliseLink($origURL)) { return $origURL; } else { return $url; @@ -1443,7 +1443,7 @@ class App // and www.example.com vs example.com. // We will only change the url to an ip address if there is no existing setting - if (empty($url) || (!link_compare($url, $this->getBaseURL())) && (!preg_match("/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/", $this->getHostName()))) { + if (empty($url) || (!Util\Strings::compareLink($url, $this->getBaseURL())) && (!preg_match("/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/", $this->getHostName()))) { Core\Config::set('system', 'url', $this->getBaseURL()); } }