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 1e1f5e4 commit 7bdd97e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/MicroweberPackages/Helper/UrlManager.php
Expand Up @@ -111,6 +111,9 @@ public function redirect($url)
}
}

if (!filter_var($redirectUrl, FILTER_VALIDATE_URL)) {
$redirectUrl = site_url();
}

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

0 comments on commit 7bdd97e

Please sign in to comment.