Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

Commit

Permalink
Fixed an XSS vulnerability
Browse files Browse the repository at this point in the history
  • Loading branch information
David Yell committed Oct 5, 2018
1 parent c9358fb commit 90fabe4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/View/Helper/SeoHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function pagination(string $controllerName): ?string
public function canonical(): string
{
$url = parse_url($this->request->getUri()->getPath());
$url = Router::fullbaseUrl() . $url['path'];
$url = Router::fullbaseUrl() . preg_replace("/[^\w\d-\/]+/", "-", $url['path']);

return "<link rel='canonical' href='$url'>";
}
Expand Down

0 comments on commit 90fabe4

Please sign in to comment.