if ($nolink)
return $data["text"].$data["after"];
- if ($plaintext)
+ $title = htmlentities($data["title"], ENT_QUOTES, 'UTF-8', false);
+ $text = htmlentities($data["text"], ENT_QUOTES, 'UTF-8', false);
+
+ if ($plaintext or strstr($text, $title))
$data["title"] = $data["url"];
if (($data["text"] == "") AND ($data["title"] != "") AND ($data["url"] == ""))
if (($data["url"] != "") AND ($data["title"] != ""))
$text .= "\n[url=".$data["url"]."]".$data["title"]."[/url]";
- elseif (($link != ""))
+ elseif (($data["url"] != ""))
$text .= "\n".$data["url"];
- return $text.$data["after"];
+ return $text."\n".$data["after"];
}
function bb_cleanstyle($st) {