mirror of
https://github.com/e107inc/e107.git
synced 2025-08-02 20:57:26 +02:00
@@ -1,16 +1,19 @@
|
|||||||
global $pref;
|
global $pref;
|
||||||
|
|
||||||
$parm = trim($parm);
|
$parm = trim($parm);
|
||||||
$external = ($pref['links_new_window'] || strpos($parm, 'external') === 0) ? " rel='external'" : "";
|
$external = ($pref['links_new_window'] || strpos($parm, 'external') === 0) ? ' rel="external"' : '';
|
||||||
|
|
||||||
if ($parm && $parm != 'external' && strpos($parm, ' ') === FALSE)
|
if ($parm && $parm != 'external' && strpos($parm, ' ') === FALSE)
|
||||||
{
|
{
|
||||||
$parm = preg_replace('#^external.#is', '', $parm);
|
$parm = preg_replace('#^external.#is', '', $parm);
|
||||||
if (strtolower(substr($parm,0,11)) == 'javascript:') return '';
|
if (strtolower(substr($parm, 0, 11)) == 'javascript:')
|
||||||
return "<a href='".$tp -> toAttribute($parm)."'".$external.">".$code_text."</a>";
|
return '';
|
||||||
|
return '<a href="'.$tp->toAttribute($parm).'" class="bbcode"'.$external.'>'.$code_text.'</a>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (strtolower(substr($code_text,0,11)) == 'javascript:') return '';
|
if (strtolower(substr($code_text, 0, 11)) == 'javascript:')
|
||||||
return "<a href='".$tp -> toAttribute($code_text)."'".$external.">".$code_text."</a>";
|
return '';
|
||||||
|
return '<a href="'.$tp->toAttribute($code_text).'" class="bbcode"'.$external.'>'.$code_text.'</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user