1
0
mirror of https://github.com/e107inc/e107.git synced 2025-03-14 01:19:44 +01:00

Bugtracker #4657 - handle language constructs in query part of links (not a nice fix!)

This commit is contained in:
e107steved 2010-01-24 11:45:04 +00:00
parent d7b9c1b9be
commit 451e1a185a

View File

@ -1,6 +1,17 @@
// $Id: link.bb,v 1.9 2010-01-24 11:44:50 e107steved Exp $
global $pref;
/*
/**
* e107 BBCodes
*
* @package e107
* @subpackage bbcode
* @version $Id: link.bb,v 1.9 2010-01-24 11:44:50 e107steved Exp $;
*
* @todo try and avoid URLs with a language in [..]
*/
/**
[link=$parm $extras]$code_text[/link]
Correct Usage:
[link=http://mysite.com external]My text[/link]
@ -30,6 +41,12 @@ global $pref;
return "<a class='bbcode' rel='external' href='javascript:window.location=\"mai\"+\"lto:\"+\"$p1\"+\"@\"+\"$p2\";self.close();' onmouseover='window.status=\"mai\"+\"lto:\"+\"$p1\"+\"@\"+\"$p2\"; return true;' onmouseout='window.status=\"\";return true;'>".$code_text."</a>";
}
if (substr($code_text,0,1) == ']')
{ // Special fix for E107 urls including a language (not nice, really)
$code_text = substr($code_text,1);
$parm .= ']';
}
list($link,$extras) = explode(" ",$parm);
if(!$parm) $link = $code_text;