aboutsummaryrefslogtreecommitdiffstats
path: root/mod/parse_url.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-11-05 01:25:08 -0800
committerfriendica <info@friendica.com>2012-11-05 01:25:08 -0800
commit2752b58f3323a15b964f6518b7720cb81ccf1b0e (patch)
tree6291006fdbe002d63adcca5a6c369457d10765e3 /mod/parse_url.php
parent5f85f65dcc71c4fea12a2227b5773b991d19199f (diff)
downloadvolse-hubzilla-2752b58f3323a15b964f6518b7720cb81ccf1b0e.tar.gz
volse-hubzilla-2752b58f3323a15b964f6518b7720cb81ccf1b0e.tar.bz2
volse-hubzilla-2752b58f3323a15b964f6518b7720cb81ccf1b0e.zip
plaintext default - richtext is a feature
Diffstat (limited to 'mod/parse_url.php')
-rw-r--r--mod/parse_url.php27
1 files changed, 6 insertions, 21 deletions
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 />');
+ $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 = "<br /><a href=\"%s\" >%s</a>%s<br />";
+ $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 = '<br /><blockquote>' . trim($text) . '</blockquote><br />';
+
+ $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 .= '<img height="'.$imagedata["height"].'" width="'.$imagedata["width"].'" src="'.$imagedata["src"].'" alt="photo" /><br />';
+ $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 = '<br /><blockquote>'.trim($text).'</blockquote><br />';
+ $text = $br.'[quote]'.trim($text).'[/quote]'.$br ;
}
if($image) {