mirror of
https://github.com/friendica/friendica
synced 2025-09-04 18:06:05 +02:00
Merge pull request #6184 from MrPetovan/task/normalize-bbcode-hashtags
Normalize BBCode hashtags links
This commit is contained in:
commit
42a3610a79
8 changed files with 44 additions and 35 deletions
|
@ -97,7 +97,7 @@ function add_page_info_data(array $data, $no_photos = false)
|
|||
/// @TODO make a positive list of allowed characters
|
||||
$hashtag = str_replace([" ", "+", "/", ".", "#", "'", "’", "`", "(", ")", "„", "“"],
|
||||
["", "", "", "", "", "", "", "", "", "", "", ""], $keyword);
|
||||
$hashtags .= "#[url=" . System::baseUrl() . "/search?tag=" . rawurlencode($hashtag) . "]" . $hashtag . "[/url] ";
|
||||
$hashtags .= "#[url=" . System::baseUrl() . "/search?tag=" . $hashtag . "]" . $hashtag . "[/url] ";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -148,7 +148,7 @@ function add_page_keywords($url, $photo = "", $keywords = false, $keyword_blackl
|
|||
$tags .= ", ";
|
||||
}
|
||||
|
||||
$tags .= "#[url=" . System::baseUrl() . "/search?tag=" . rawurlencode($hashtag) . "]" . $hashtag . "[/url]";
|
||||
$tags .= "#[url=" . System::baseUrl() . "/search?tag=" . $hashtag . "]" . $hashtag . "[/url]";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue