From 2752b58f3323a15b964f6518b7720cb81ccf1b0e Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 5 Nov 2012 01:25:08 -0800 Subject: plaintext default - richtext is a feature --- mod/parse_url.php | 27 ++++++--------------------- 1 file changed, 6 insertions(+), 21 deletions(-) (limited to 'mod/parse_url.php') diff --git a/mod/parse_url.php b/mod/parse_url.php index 962c3e368..600d3dc8b 100644 --- a/mod/parse_url.php +++ b/mod/parse_url.php @@ -237,12 +237,8 @@ function parse_url_content(&$a) { $text = null; $str_tags = ''; - $textmode = false; - if(local_user() && intval(get_pconfig(local_user(),'system','plaintext'))) - $textmode = true; - //if($textmode) - $br = (($textmode) ? "\n" : '
'); + $br = "\n"; if(x($_GET,'binurl')) $url = trim(hex2bin($_GET['binurl'])); @@ -265,10 +261,7 @@ function parse_url_content(&$a) { logger('parse_url: ' . $url); - if($textmode) - $template = $br . '[url=%s]%s[/url]%s' . $br; - else - $template = "
%s%s
"; + $template = $br . '[url=%s]%s[/url]%s' . $br; $arr = array('url' => $url, 'text' => ''); @@ -282,10 +275,8 @@ function parse_url_content(&$a) { if($url && $title && $text) { - if($textmode) - $text = $br . '[quote]' . trim($text) . '[/quote]' . $br; - else - $text = '
' . trim($text) . '

'; + + $text = $br . '[quote]' . trim($text) . '[/quote]' . $br; $title = str_replace(array("\r","\n"),array('',''),$title); @@ -320,10 +311,7 @@ function parse_url_content(&$a) { $max_images = intval($max_images); foreach ($siteinfo["images"] as $imagedata) { - if($textmode) - $image .= '[img='.$imagedata["width"].'x'.$imagedata["height"].']'.$imagedata["src"].'[/img]' . "\n"; - else - $image .= 'photo
'; + $image .= '[img='.$imagedata["width"].'x'.$imagedata["height"].']'.$imagedata["src"].'[/img]' . "\n"; $total_images ++; if($max_images && $max_images >= $total_images) break; @@ -331,10 +319,7 @@ function parse_url_content(&$a) { } if(strlen($text)) { - if($textmode) - $text = $br.'[quote]'.trim($text).'[/quote]'.$br ; - else - $text = '
'.trim($text).'

'; + $text = $br.'[quote]'.trim($text).'[/quote]'.$br ; } if($image) { -- cgit v1.2.3