1
0
mirror of https://github.com/e107inc/e107.git synced 2025-02-22 15:55:39 +01:00

20 lines
614 B
BlitzBasic
Raw Normal View History

2006-12-02 04:36:16 +00:00
global $pref;
$parm = trim($parm);
$external = ($pref['links_new_window'] || strpos($parm, 'external') === 0) ? ' rel="external"' : '';
2006-12-02 04:36:16 +00:00
if ($parm && $parm != 'external' && strpos($parm, ' ') === FALSE)
{
$parm = preg_replace('#^external.#is', '', $parm);
if (strtolower(substr($parm, 0, 11)) == 'javascript:')
return '';
return '<a href="'.$tp->toAttribute($parm).'" class="bbcode"'.$external.'>'.$code_text.'</a>';
2006-12-02 04:36:16 +00:00
}
else
{
if (strtolower(substr($code_text, 0, 11)) == 'javascript:')
return '';
return '<a href="'.$tp->toAttribute($code_text).'" class="bbcode"'.$external.'>'.$code_text.'</a>';
2006-12-02 04:36:16 +00:00
}