X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fparse_url.php;h=77529714f20f56a83cadcee7e075be5b8d07b2aa;hb=caad9f5214f9f8c94e487629007b0f33c1b2008d;hp=2c610f275138cc4b489cd3f431e022192cee667c;hpb=5eaa5951a1b19b985017b5db20f3b1abf464a1ef;p=friendica.git diff --git a/mod/parse_url.php b/mod/parse_url.php index 2c610f2751..77529714f2 100644 --- a/mod/parse_url.php +++ b/mod/parse_url.php @@ -4,13 +4,8 @@ * @file mod/parse_url.php * @brief The parse_url module * - * This module does parse an url for embedable content (audio, video, image files or link) - * information and does format this information to BBCode or html (this depends - * on the user settings - default is BBCode output). - * If the user has enabled the richtext editor setting the output will be in html - * (Note: This is not always possible and in some case not useful because - * the richtext editor doesn't support all kind of html). - * Otherwise the output will be constructed BBCode. + * This module does parse an url for embeddable content (audio, video, image files or link) + * information and does format this information to BBCode * * @see ParseUrl::getSiteinfo() for more information about scraping embeddable content */ @@ -24,13 +19,7 @@ function parse_url_content(App $a) { $text = null; $str_tags = ""; - $textmode = false; - - if (local_user() && (!feature_enabled(local_user(), "richtext"))) { - $textmode = true; - } - - $br = (($textmode) ? "\n" : "
"); + $br = "\n"; if (x($_GET,"binurl")) { $url = trim(hex2bin($_GET["binurl"])); @@ -97,11 +86,7 @@ function parse_url_content(App $a) { } } - if ($textmode) { - $template = "[bookmark=%s]%s[/bookmark]%s"; - } else { - $template = "%s%s"; - } + $template = "[bookmark=%s]%s[/bookmark]%s"; $arr = array("url" => $url, "text" => ""); @@ -118,12 +103,7 @@ function parse_url_content(App $a) { $title = str_replace(array("\r","\n"),array("",""),$title); - if ($textmode) { - $text = "[quote]" . trim($text) . "[/quote]" . $br; - } else { - $text = "
" . htmlspecialchars(trim($text)) . "

"; - $title = htmlspecialchars($title); - } + $text = "[quote]" . trim($text) . "[/quote]" . $br; $result = sprintf($template, $url, ($title) ? $title : $url, $text) . $str_tags; @@ -141,11 +121,6 @@ function parse_url_content(App $a) { // Format it as BBCode attachment $info = add_page_info_data($siteinfo); - if (!$textmode) { - // Replace ' with ’ - not perfect - but the richtext editor has problems otherwise - $info = str_replace(array("'"), array("’"), $info); - } - echo $info; killme();