]> git.mxchange.org Git - friendica.git/commitdiff
In "parse_url" now links with [ or ] are replaced with shortened versions to avoid...
authorMichael Vogel <icarus@dabo.de>
Mon, 1 Dec 2014 21:54:01 +0000 (22:54 +0100)
committerMichael Vogel <icarus@dabo.de>
Mon, 1 Dec 2014 21:54:01 +0000 (22:54 +0100)
mod/parse_url.php

index 564b22c0424a70d3da8459ba0f900b02b986d68f..06e59b869157d2188413a088c63a6baea117add4 100644 (file)
@@ -187,6 +187,9 @@ function parseurl_getsiteinfo($url, $no_guessing = false, $do_oembed = true, $co
                                case "description":
                                        $siteinfo["text"] = $attr["content"];
                                        break;
+                               case "thumbnail":
+                                       $siteinfo["image"] = $attr["content"];
+                                       break;
                                case "twitter:image":
                                        $siteinfo["image"] = $attr["content"];
                                        break;
@@ -421,6 +424,12 @@ function parse_url_content(&$a) {
 
        $url= $siteinfo["url"];
 
+       // If the link contains BBCode stuff, make a short link out of this to avoid parsing problems
+       if (strpos($url, '[') OR strpos($url, ']')) {
+               require_once("include/network.php");
+               $url = short_link($url);
+       }
+
        $sitedata = "";
 
        if($siteinfo["title"] == "") {