]> git.mxchange.org Git - friendica.git/commitdiff
If a link contains BBCode stuff, make a short link out of this to avoid parsing problems
authorMichael Vogel <icarus@dabo.de>
Mon, 1 Dec 2014 21:51:41 +0000 (22:51 +0100)
committerMichael Vogel <icarus@dabo.de>
Mon, 1 Dec 2014 21:51:41 +0000 (22:51 +0100)
include/items.php

index 5b275593576f82de68aa9902f1764347af05000e..0398f545884eef878a0ce27b687bef74d4d69bab 100644 (file)
@@ -903,6 +903,12 @@ function add_page_info_data($data) {
        if ($no_photos AND ($data["type"] == "photo"))
                return("");
 
+       // If the link contains BBCode stuff, make a short link out of this to avoid parsing problems
+       if (strpos($data["url"], '[') OR strpos($data["url"], ']')) {
+               require_once("include/network.php");
+               $data["url"] = short_link($data["url"]);
+       }
+
        if (($data["type"] != "photo") AND is_string($data["title"]))
                $text .= "[bookmark=".$data["url"]."]".trim($data["title"])."[/bookmark]";