Added the target attribute on links generated with do_bbcode_url

This commit is contained in:
Simon Justesen 2023-11-11 00:29:23 +01:00
parent 2ce063d6b1
commit 30194ac45a

View File

@ -144,8 +144,9 @@ function do_bbcode_url($action, $attributes, $content, $params, $node_object) {
// DMKE: uh?
$content = $content;
$rel = isset($attributes ['rel']) ? ' rel="' . $attributes ['rel'] . '"' : '';
$target = isset($attributes['target']) ? ' target="'.$attributes['target'] . '"' : '';
$extern = !$local ? ' class="externlink" title="' . $lang ['plugin'] ['bbcode'] ['go_to'] . ' ' . $the_url . '"' : '';
return '<a' . $extern . ' href="' . $the_url . '"' . $rel . '>' . $content . '</a>';
return '<a' . $extern . ' href="' . $the_url . '"' . $rel . $target .'>' . $content . '</a>';
}
/**