fix for _top condition on making sure links are opened either with target _top or _blank

This commit is contained in:
Klaus Leithoff 2013-12-19 15:51:26 +00:00
parent b8116e1c4d
commit f965a14a86

View File

@ -193,7 +193,7 @@
if ($matches[2]==$matches[1]) $linkTextislink = true;
$matches[1] = str_replace(' ','%20',$matches[1]);
//return ($linkTextislink?' ':'[ ').$matches[1].($linkTextislink?'':' -> '.$matches[2]).($linkTextislink?' ':' ]');
return '<a target="'.((stripos($link,$webserverURL) !== false || stripos($link,$fullWebServerUrl) !== false || substr(trim($link),0,1) == '/')?'_top':'_blank').'" href="'.$matches[1].'">'.($linkTextislink?$matches[1]:$matches[2]).'</a>';
return '<a target="'.((stripos($matches[1],$webserverURL) !== false || stripos($matches[1],$fullWebServerUrl) !== false || substr(trim($matches[1]),0,1) == '/')?'_top':'_blank').'" href="'.$matches[1].'">'.($linkTextislink?$matches[1]:$matches[2]).'</a>';
}
function parseHREF (&$body) {