From 8f72b9ca9ab50e2fba4b59e94fadda4a012e105b Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Thu, 22 Nov 2018 09:39:38 -0500 Subject: [PATCH] [various] Remove useless rawurlencode calls --- statusnet/statusnet.php | 2 +- twitter/twitter.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/statusnet/statusnet.php b/statusnet/statusnet.php index 7fc6d4d3..a022bf20 100644 --- a/statusnet/statusnet.php +++ b/statusnet/statusnet.php @@ -1534,7 +1534,7 @@ function statusnet_convertmsg(App $a, $body, $no_tags = false) if ($mtch[1] == "#") { // Replacing the hash tags that are directed to the GNU Social server with internal links $snhash = "#[url=" . $mtch[2] . "]" . $mtch[3] . "[/url]"; - $frdchash = '#[url=' . $a->getBaseURL() . '/search?tag=' . rawurlencode($mtch[3]) . ']' . $mtch[3] . '[/url]'; + $frdchash = '#[url=' . $a->getBaseURL() . '/search?tag=' . $mtch[3] . ']' . $mtch[3] . '[/url]'; $body = str_replace($snhash, $frdchash, $body); $str_tags .= $frdchash; diff --git a/twitter/twitter.php b/twitter/twitter.php index 73114a0c..f680ded4 100644 --- a/twitter/twitter.php +++ b/twitter/twitter.php @@ -1200,7 +1200,7 @@ function twitter_expand_entities(App $a, $body, $item, $picture) $tags_arr = []; foreach ($item->entities->hashtags AS $hashtag) { - $url = '#[url=' . $a->getBaseURL() . '/search?tag=' . rawurlencode($hashtag->text) . ']' . $hashtag->text . '[/url]'; + $url = '#[url=' . $a->getBaseURL() . '/search?tag=' . $hashtag->text . ']' . $hashtag->text . '[/url]'; $tags_arr['#' . $hashtag->text] = $url; $body = str_replace('#' . $hashtag->text, $url, $body); } @@ -1331,7 +1331,7 @@ function twitter_expand_entities(App $a, $body, $item, $picture) } $basetag = str_replace('_', ' ', substr($tag, 1)); - $url = '#[url=' . $a->getBaseURL() . '/search?tag=' . rawurlencode($basetag) . ']' . $basetag . '[/url]'; + $url = '#[url=' . $a->getBaseURL() . '/search?tag=' . $basetag . ']' . $basetag . '[/url]'; $body = str_replace($tag, $url, $body); $tags_arr['#' . $basetag] = $url; } elseif (strpos($tag, '@') === 0) { -- 2.43.5