Replace html2bbcode calls by HTML::toBBCode

This commit is contained in:
Hypolite Petovan 2018-03-07 16:24:13 -05:00
parent 3bb2f72d05
commit b5666bd27f
9 changed files with 32 additions and 30 deletions

View file

@ -10,6 +10,7 @@ use Friendica\App;
use Friendica\Content\ContactSelector;
use Friendica\Content\Feature;
use Friendica\Content\Text\BBCode;
use Friendica\Content\Text\HTML;
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\L10n;
@ -1096,7 +1097,7 @@ function api_statuses_mediap($type)
$purifier = new HTMLPurifier($config);
$txt = $purifier->purify($txt);
}
$txt = html2bbcode($txt);
$txt = HTML::toBBCode($txt);
$a->argv[1]=$user_info['screen_name']; //should be set to username?
@ -1147,7 +1148,7 @@ function api_statuses_update($type)
$purifier = new HTMLPurifier($config);
$txt = $purifier->purify($txt);
$_REQUEST['body'] = html2bbcode($txt);
$_REQUEST['body'] = HTML::toBBCode($txt);
}
} else {
$_REQUEST['body'] = requestdata('status');