1
1
Fork 0

Merge pull request #7296 from MrPetovan/task/smilies-replace

Limit smilies replacement to BBCode::convert
This commit is contained in:
Michael Vogel 2019-06-24 22:05:37 +02:00 committed by GitHub
commit 26accbe3ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 13 additions and 12 deletions

View file

@ -140,16 +140,12 @@ function redir_private_images($a, &$item)
* @brief Given a text string, convert from bbcode to html and add smilie icons.
*
* @param string $text String with bbcode.
* @return string Formattet HTML.
* @return string Formatted HTML
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
function prepare_text($text) {
if (stristr($text, '[nosmile]')) {
$s = BBCode::convert($text);
} else {
$s = Smilies::replace(BBCode::convert($text));
}
function prepare_text($text)
{
$s = BBCode::convert($text);
return trim($s);
}