Compare commits

..

No commits in common. "6abdb0d593a521702172cdbc40b312f611703f6d" and "185c007b5080c1592e103930e9d575c4f64d20d9" have entirely different histories.

View file

@ -36,9 +36,9 @@ trait TRichText
"%(([A-z]++):\/\/(\S*?\.\S*?))([\s)\[\]{},\"\'<]|\.\s|$)%",
(function (array $matches): string {
$href = str_replace("#", "&num;", $matches[1]);
$href = rawurlencode(str_replace(";", "&#59;", $href));
$href = rawurlencode(str_replace(";", "&#59;", $matches[1]));
$link = str_replace("#", "&num;", $matches[3]);
$link = str_replace(";", "&#59;", $link);
$link = str_replace(";", "&#59;", $matches[3]);
$rel = $this->isAd() ? "sponsored" : "ugc";
return "<a href='/away.php?to=$href' rel='$rel' target='_blank'>$link</a>" . htmlentities($matches[4]);
@ -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", "<EFBFBD>", $text);
}
function resolveMentions(array $skipUsers = []): \Traversable