BBCodeLibrary::DoURL( $bbcode,  $action,  $name,  $default,  $params,  $content )

Description

Source

File: bp-forums/admin/parser.php

function DoURL($bbcode, $action, $name, $default, $params, $content) {
if ($action == BBCODE_CHECK) return true;
$url = is_string($default) ? $default : $bbcode->UnHTMLEncode(strip_tags($content));
if ($bbcode->IsValidURL($url)) {
if ($bbcode->debug)
print "ISVALIDURL<br />";
if ($bbcode->url_targetable !== false && isset($params['target']))
$target = " target=\"" . htmlspecialchars($params['target']) . "\"";
else $target = "";
if ($bbcode->url_target !== false)
if (!($bbcode->url_targetable == 'override' && isset($params['target'])))
$target = " target=\"" . htmlspecialchars($bbcode->url_target) . "\"";
return '<a href="' . htmlspecialchars($url) . '" class="bbcode_url"' . $target . '>' . $content . '</a>';
}
else return htmlspecialchars($params['_tag']) . $content . htmlspecialchars($params['_endtag']);
}

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.