urlencode for tags / fix smiley replacement

This commit is contained in:
Michael 2024-02-12 04:46:20 +00:00
parent 5d4f72698d
commit fe00a3893d
5 changed files with 8 additions and 8 deletions

View file

@ -2491,7 +2491,7 @@ class Item
}
$basetag = str_replace('_', ' ', substr($tag, 1));
$newtag = '#[url=' . DI::baseUrl() . '/search?tag=' . $basetag . ']' . $basetag . '[/url]';
$newtag = '#[url=' . DI::baseUrl() . '/search?tag=' . urlencode($basetag) . ']' . $basetag . '[/url]';
$body = str_replace($tag, $newtag, $body);
}

View file

@ -558,7 +558,7 @@ class Tag
);
while ($tag = DBA::fetch($taglist)) {
if ($tag['url'] == '') {
$tag['url'] = $searchpath . rawurlencode($tag['name']);
$tag['url'] = $searchpath . urlencode($tag['name']);
}
$orig_tag = $tag['url'];