Change __toString() to get encoded url string

This commit is contained in:
Sukhwinder Dhillon 2020-12-07 12:52:30 +01:00 committed by Johannes Meyer
parent 7c58b3ced1
commit 53388a3940
1 changed files with 1 additions and 1 deletions

View File

@ -866,6 +866,6 @@ class Url
*/
public function __toString()
{
return $this->getAbsoluteUrl('&');
return htmlspecialchars($this->getAbsoluteUrl(), ENT_COMPAT | ENT_SUBSTITUTE | ENT_HTML5, 'UTF-8', true);
}
}