mirror of
https://github.com/openvk/openvk
synced 2025-07-05 23:39:53 +03:00
Compare commits
No commits in common. "6abdb0d593a521702172cdbc40b312f611703f6d" and "185c007b5080c1592e103930e9d575c4f64d20d9" have entirely different histories.
6abdb0d593
...
185c007b50
1 changed files with 3 additions and 3 deletions
|
@ -36,9 +36,9 @@ trait TRichText
|
|||
"%(([A-z]++):\/\/(\S*?\.\S*?))([\s)\[\]{},\"\'<]|\.\s|$)%",
|
||||
(function (array $matches): string {
|
||||
$href = str_replace("#", "#", $matches[1]);
|
||||
$href = rawurlencode(str_replace(";", ";", $href));
|
||||
$href = rawurlencode(str_replace(";", ";", $matches[1]));
|
||||
$link = str_replace("#", "#", $matches[3]);
|
||||
$link = str_replace(";", ";", $link);
|
||||
$link = str_replace(";", ";", $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
|
||||
|
|
Loading…
Reference in a new issue