mirror of
https://github.com/openvk/openvk
synced 2025-03-21 08:48:13 +03:00
fix(links, away) (fixes #1253)
This commit is contained in:
parent
4815186b79
commit
a12c77083b
2 changed files with 5 additions and 5 deletions
|
@ -41,11 +41,11 @@ trait TRichText
|
|||
return preg_replace_callback(
|
||||
"%(([A-z]++):\/\/(\S*?\.\S*?))([\s)\[\]{},\"\'<]|\.\s|$)%",
|
||||
(function (array $matches): string {
|
||||
$href = str_replace("#", "#", $matches[1]);
|
||||
$href = rawurlencode(str_replace(";", ";", $href));
|
||||
$link = str_replace("#", "#", $matches[3]);
|
||||
$href = rawurlencode($matches[1]);
|
||||
$href = str_replace("%26amp%3B", "%26", $href);
|
||||
$link = $matches[3];
|
||||
# this string breaks ampersands
|
||||
$link = str_replace(";", ";", $link);
|
||||
# $link = str_replace(";", ";", $link);
|
||||
$rel = $this->isAd() ? "sponsored" : "ugc";
|
||||
|
||||
/*$server_domain = str_replace(':' . $_SERVER['SERVER_PORT'], '', $_SERVER['HTTP_HOST']);
|
||||
|
|
|
@ -20,7 +20,7 @@ final class AwayPresenter extends OpenVKPresenter
|
|||
|
||||
header("HTTP/1.0 302 Found");
|
||||
header("X-Robots-Tag: noindex, nofollow, noarchive");
|
||||
header("Location: " . $this->queryParam("to"));
|
||||
header("Location: " . rawurldecode($this->queryParam("to")));
|
||||
exit;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue