Remove useless rawurlencode calls for building hashtag bbcode

- Fix some formatting
This commit is contained in:
Hypolite Petovan 2018-11-22 09:23:42 -05:00
parent 540321d0aa
commit 4874f7f8ab
7 changed files with 25 additions and 25 deletions

View file

@ -2448,15 +2448,15 @@ class Item extends BaseObject
$basetag = str_replace('_',' ',substr($tag,1));
$newtag = '#[url=' . System::baseUrl() . '/search?tag=' . rawurlencode($basetag) . ']' . $basetag . '[/url]';
$newtag = '#[url=' . System::baseUrl() . '/search?tag=' . $basetag . ']' . $basetag . '[/url]';
$item["body"] = str_replace($tag, $newtag, $item["body"]);
if (!stristr($item["tag"], "/search?tag=" . $basetag . "]" . $basetag . "[/url]")) {
if (strlen($item["tag"])) {
$item["tag"] = ','.$item["tag"];
$item["tag"] = ',' . $item["tag"];
}
$item["tag"] = $newtag.$item["tag"];
$item["tag"] = $newtag . $item["tag"];
}
}