1
1
Fork 0

If a link contains BBCode stuff, make a short link out of this to avoid parsing problems

This commit is contained in:
Michael Vogel 2014-12-01 22:51:41 +01:00
parent 766915061c
commit d2d3804e09

View 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]";