Remove unused parameter preserve_nl in BBCode::convert
This commit is contained in:
parent
ee380c3149
commit
29f5270313
|
@ -7,5 +7,5 @@ use Friendica\Content\Text\BBCode;
|
||||||
|
|
||||||
function bbcode($Text, $preserve_nl = false, $tryoembed = true, $simplehtml = false, $forplaintext = false)
|
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);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1342,13 +1342,12 @@ class BBCode
|
||||||
* - 8: Used for WP backlink text setting
|
* - 8: Used for WP backlink text setting
|
||||||
*
|
*
|
||||||
* @param string $text
|
* @param string $text
|
||||||
* @param bool $preserve_nl
|
|
||||||
* @param bool $try_oembed
|
* @param bool $try_oembed
|
||||||
* @param int $simple_html
|
* @param int $simple_html
|
||||||
* @param bool $for_plaintext
|
* @param bool $for_plaintext
|
||||||
* @return string
|
* @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();
|
$a = get_app();
|
||||||
|
|
||||||
|
@ -1473,10 +1472,6 @@ class BBCode
|
||||||
|
|
||||||
$text = str_replace(["\r","\n"], ['<br />', '<br />'], $text);
|
$text = str_replace(["\r","\n"], ['<br />', '<br />'], $text);
|
||||||
|
|
||||||
if ($preserve_nl) {
|
|
||||||
$text = str_replace(["\n", "\r"], ['', ''], $text);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Remove all hashtag addresses
|
// Remove all hashtag addresses
|
||||||
if ((!$try_oembed || $simple_html) && !in_array($simple_html, [3, 7])) {
|
if ((!$try_oembed || $simple_html) && !in_array($simple_html, [3, 7])) {
|
||||||
$text = preg_replace("/([#@!])\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism", '$1$3', $text);
|
$text = preg_replace("/([#@!])\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism", '$1$3', $text);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user