mirror of
https://github.com/friendica/friendica
synced 2024-12-23 09:20:17 +00:00
If a link contains BBCode stuff, make a short link out of this to avoid parsing problems
This commit is contained in:
parent
766915061c
commit
d2d3804e09
1 changed files with 6 additions and 0 deletions
|
@ -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]";
|
||||
|
||||
|
|
Loading…
Reference in a new issue