Merge pull request #270 from sjustesen/master

Added the target attribute on links generated with do_bbcode_url
This commit is contained in:
Arvid Zimmermann 2024-01-06 12:00:04 +01:00 committed by GitHub
commit 1ece26d5d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -145,8 +145,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>';
}
/**