Skip to content

Commit

Permalink
Update UrlManager.php
Browse files Browse the repository at this point in the history
  • Loading branch information
bobimicroweber committed Feb 17, 2022
1 parent 7bdd97e commit f0e338f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/MicroweberPackages/Helper/UrlManager.php
Expand Up @@ -111,9 +111,8 @@ public function redirect($url)
}
}

if (!filter_var($redirectUrl, FILTER_VALIDATE_URL)) {
$redirectUrl = site_url();
}
$redirectUrl = str_replace("\r", "", $redirectUrl);
$redirectUrl = str_replace("\n", "", $redirectUrl);

if (headers_sent()) {
echo '<meta http-equiv="refresh" content="0;url=' . $redirectUrl . '">';
Expand Down

0 comments on commit f0e338f

Please sign in to comment.