From: Hypolite Petovan Date: Thu, 15 Feb 2018 01:28:10 +0000 (-0500) Subject: Remove unused parameter preserve_nl in BBCode::convert X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=29f5270313b067e9cc1ce83ccfb79c4cb7b91d0c;p=friendica.git Remove unused parameter preserve_nl in BBCode::convert --- diff --git a/include/bbcode.php b/include/bbcode.php index ab211e5549..0bda691acc 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -7,5 +7,5 @@ use Friendica\Content\Text\BBCode; 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); } diff --git a/src/Content/Text/BBCode.php b/src/Content/Text/BBCode.php index 71daa1d145..a81b69e34b 100644 --- a/src/Content/Text/BBCode.php +++ b/src/Content/Text/BBCode.php @@ -1342,13 +1342,12 @@ class BBCode * - 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(); @@ -1473,10 +1472,6 @@ class BBCode $text = str_replace(["\r","\n"], ['
', '
'], $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);