diff --git a/Web/Models/Entities/Traits/TRichText.php b/Web/Models/Entities/Traits/TRichText.php index ed1c8df0..dc78a034 100644 --- a/Web/Models/Entities/Traits/TRichText.php +++ b/Web/Models/Entities/Traits/TRichText.php @@ -36,7 +36,7 @@ trait TRichText "%(([A-z]++):\/\/(\S*?\.\S*?))([\s)\[\]{},\"\'<]|\.\s|$)%", (function (array $matches): string { $href = str_replace("#", "#", $matches[1]); - $href = rawurlencode(str_replace(";", ";", $matches[1])); + $href = rawurlencode(str_replace(";", ";", $href)); $link = str_replace("#", "#", $matches[3]); $link = str_replace(";", ";", $link); $rel = $this->isAd() ? "sponsored" : "ugc"; @@ -49,7 +49,7 @@ trait TRichText private function removeZalgo(string $text): string { - return preg_replace("%\p{M}{3,}%Xu", "�", $text); + return preg_replace("%\p{M}{3,}%Xu", "", $text); } function resolveMentions(array $skipUsers = []): \Traversable