function bbcode($Text, $preserve_nl = false, $tryoembed = true, $simplehtml = false, $forplaintext = false)
{
- return BBCode::convert($Text, $preserve_nl, $tryoembed, $simplehtml, $forplaintext);
+ return BBCode::convert($Text, $tryoembed, $simplehtml, $forplaintext);
}
* - 8: Used for WP backlink text setting
*
* @param string $text
- * @param bool $preserve_nl
* @param bool $try_oembed
* @param int $simple_html
* @param bool $for_plaintext
* @return string
*/
- public static function convert($text, $preserve_nl = false, $try_oembed = true, $simple_html = false, $for_plaintext = false)
+ public static function convert($text, $try_oembed = true, $simple_html = false, $for_plaintext = false)
{
$a = get_app();
$text = str_replace(["\r","\n"], ['<br />', '<br />'], $text);
- if ($preserve_nl) {
- $text = str_replace(["\n", "\r"], ['', ''], $text);
- }
-
// Remove all hashtag addresses
if ((!$try_oembed || $simple_html) && !in_array($simple_html, [3, 7])) {
$text = preg_replace("/([#@!])\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism", '$1$3', $text);