1
0
mirror of https://github.com/e107inc/e107.git synced 2025-02-24 16:52:43 +01:00

17 lines
575 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'" : "";
if ($parm && $parm != 'external' && strpos($parm, ' ') === FALSE)
{
$parm = preg_replace('#^external.#is', '', $parm);
2007-06-15 19:30:57 +00:00
if (strtolower(substr($parm,0,11)) == 'javascript:') return '';
2006-12-02 04:36:16 +00:00
return "<a href='".$tp -> toAttribute($parm)."'".$external.">".$code_text."</a>";
}
else
{
2007-06-15 19:30:57 +00:00
if (strtolower(substr($parm,0,11)) == 'javascript:') return '';
2006-12-02 04:36:16 +00:00
return "<a href='".$tp -> toAttribute($code_text)."'".$external.">".$code_text."</a>";
}