Added characters to the disallowed hashtag characters

This commit is contained in:
Michael Vogel 2020-02-11 23:14:26 +01:00
parent d6357c97e5
commit 1eec1349eb
1 changed files with 1 additions and 2 deletions

View File

@ -89,8 +89,7 @@ function add_page_info_data(array $data, $no_photos = false)
$hashtags = "\n";
foreach ($data["keywords"] as $keyword) {
/// @TODO make a positive list of allowed characters
$hashtag = str_replace([" ", "+", "/", ".", "#", "'", "", "`", "(", ")", "", ""],
["", "", "", "", "", "", "", "", "", "", "", ""], $keyword);
$hashtag = str_replace([' ', '+', '/', '.', '#', '@', "'", '"', '', '`', '(', ')', '„', '“'], '', $keyword);
$hashtags .= "#[url=" . DI::baseUrl() . "/search?tag=" . $hashtag . "]" . $hashtag . "[/url] ";
}
}