1
0
Fork 0

Refactor bbcode() into BBCode::convert()

This commit is contained in:
Hypolite Petovan 2018-02-14 21:33:55 -05:00
commit 0c52866693
21 changed files with 89 additions and 73 deletions

View file

@ -164,7 +164,7 @@ function bb2diaspora($Text, $preserve_nl = false, $fordiaspora = true) {
// Convert it to HTML - don't try oembed
if ($fordiaspora) {
$Text = bbcode($Text, $preserve_nl, false, 3);
$Text = BBCode::convert($Text, false, 3);
// Add all tags that maybe were removed
if (preg_match_all("/#\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism", $OriginalText, $tags)) {
@ -178,7 +178,7 @@ function bb2diaspora($Text, $preserve_nl = false, $fordiaspora = true) {
$Text = $Text." ".$tagline;
}
} else {
$Text = bbcode($Text, $preserve_nl, false, 4);
$Text = BBCode::convert($Text, false, 4);
}
// mask some special HTML chars from conversation to markdown