mirror of
https://github.com/e107inc/e107.git
synced 2025-03-14 17:39:46 +01:00
Bugtracker #4657 - handle language constructs in query part of links (not a nice fix!)
This commit is contained in:
parent
d7b9c1b9be
commit
451e1a185a
@ -1,6 +1,17 @@
|
|||||||
|
// $Id: link.bb,v 1.9 2010-01-24 11:44:50 e107steved Exp $
|
||||||
global $pref;
|
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]
|
[link=$parm $extras]$code_text[/link]
|
||||||
Correct Usage:
|
Correct Usage:
|
||||||
[link=http://mysite.com external]My text[/link]
|
[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>";
|
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);
|
list($link,$extras) = explode(" ",$parm);
|
||||||
|
|
||||||
if(!$parm) $link = $code_text;
|
if(!$parm) $link = $code_text;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user