Adjust how tags URLs are calculated to support tags with non-ASCII characters like 'children’s'

This commit is contained in:
Alex Cabal 2022-06-18 21:17:33 -05:00
parent c5b686636b
commit 6c267497cc
5 changed files with 14 additions and 20 deletions

View file

@ -2,9 +2,11 @@
class Tag{
public $Name;
public $Url;
public $UrlName;
public function __construct(string $name){
$this->Name = $name;
$this->Url = '/tags/' . strtolower(str_replace(' ', '-', Formatter::ToPlainText($this->Name)));
$this->UrlName = Formatter::MakeUrlSafe($this->Name);
$this->Url = '/tags/' . $this->UrlName;
}
}