forked from extern/egroupware
fixed bug [ 1106069 ] bad hypertext link creation when '&' is in the URL
This commit is contained in:
parent
4425e6383a
commit
a029793462
@ -110,7 +110,7 @@ class html
|
|||||||
// First match things beginning with http:// (or other protocols)
|
// First match things beginning with http:// (or other protocols)
|
||||||
$Protocol = '(http|ftp|https):\/\/';
|
$Protocol = '(http|ftp|https):\/\/';
|
||||||
$Domain = '([\w]+.[\w]+)';
|
$Domain = '([\w]+.[\w]+)';
|
||||||
$Subdir = '([\w\-\.,@?^=%&:\/~\+#]*[\w\-\@?^=%&\/~\+#])?';
|
$Subdir = '([\w\-\.,@?^=%&;:\/~\+#]*[\w\-\@?^=%&\/~\+#])?';
|
||||||
$Expr = '/' . $NotAnchor . $Protocol . $Domain . $Subdir . '/i';
|
$Expr = '/' . $NotAnchor . $Protocol . $Domain . $Subdir . '/i';
|
||||||
|
|
||||||
$result = preg_replace( $Expr, "<a href=\"$0\" target=\"_blank\">$2$3</a>", $result );
|
$result = preg_replace( $Expr, "<a href=\"$0\" target=\"_blank\">$2$3</a>", $result );
|
||||||
|
Loading…
Reference in New Issue
Block a user