mirror of
https://github.com/openvk/openvk
synced 2024-11-15 03:31:18 +03:00
Compare commits
2 commits
185c007b50
...
6abdb0d593
Author | SHA1 | Date | |
---|---|---|---|
|
6abdb0d593 | ||
|
56fe715bce |
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(";", ";", $matches[1]));
|
||||
$href = rawurlencode(str_replace(";", ";", $href));
|
||||
$link = str_replace("#", "#", $matches[3]);
|
||||
$link = str_replace(";", ";", $matches[3]);
|
||||
$link = str_replace(";", ";", $link);
|
||||
$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", "<EFBFBD>", $text);
|
||||
return preg_replace("%\p{M}{3,}%Xu", "", $text);
|
||||
}
|
||||
|
||||
function resolveMentions(array $skipUsers = []): \Traversable
|
||||
|
|
Loading…
Reference in a new issue