Yes, in my case the solution was disable the plugins and check which one was the traitor!
and i found it, it was one to redirect target:_blank the weblinks to point to external url.
/**
* RC Link Redirector
*
* Plugin that replaces external links to encrypted internal links
*
* @category plugin
* @version 0.8.2+
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License (GPL)
* @author Roland Chanishvili, additions by Temus
* @internal @properties &rcr_comment_text=Convert link text;list;true,false;true;&rcr_comment_text_val=Link text;text;[link];&rcr_blank=Add target;list;true,false;true;&rcr_nofollow=Add nofollow;list;true,false;true;&rcr_relink_val=Base link;text;ext;&rcr_noindex=Add noindex;list;true,false;false;&rcr_rel_stop=Use stop rel;list;true,false;false;&rcr_rel_val=Rel;text;&rcr_class_stop=Use stop class;list;true,false;false;&rcr_class_val=Class;text;&rcr_stop=Use stop list;list;true,false;true;&rcr_stop_list=Stop list;textarea;yandex.ru,google.com;
* @internal @events OnWebPagePrerender
* @internal @modx_category SEO
*/
/*
Plugin: RC Link Redirector 0.8.2+
Created By: Roland Chanishvili (http://chanishvili.org/)
Adaptation for MODx: Temus ([email protected])
Events: OnWebPagePrerender
Configuration:
&rcr_comment_text=Convert link text;list;true,false;true;
&rcr_comment_text_val=Link text;text;[link];
&rcr_blank=Add target;list;true,false;true;
&rcr_nofollow=Add nofollow;list;true,false;true;
&rcr_relink_val=Base link;text;ext;
&rcr_noindex=Add noindex;list;true,false;false;
&rcr_rel_stop=Use stop rel;list;true,false;false;
&rcr_rel_val=Rel;text;
&rcr_class_stop=Use stop class;list;true,false;false;
&rcr_class_val=Class;text;
&rcr_stop=Use stop list;list;true,false;true;
&rcr_stop_list=Stop list;textarea;yandex.ru,google.com;
*/
global $rcr_opt;
$rcr_opt = array(
'rcr_comment_text' => isset($rcr_comment_text)&&($rcr_comment_text=='false') ? 0 : 1, //change link text to comment text
'rcr_comment_text_val' => isset($rcr_comment_text_val) ? $rcr_comment_text_val : "[link]",
'rcr_blank' => isset($rcr_blank)&&($rcr_blank=='false') ? 0 : 1, //add target=_blank (except files)
'rcr_nofollow' => isset($rcr_nofollow)&&($rcr_nofollow=='false') ? 0 : 1, //add rel=nofollow
'rcr_relink_val' => isset($rcr_relink_val) ? $rcr_relink_val : "ext", //base link for redirect
'rcr_noindex' => isset($rcr_noindex)&&($rcr_noindex=='true') ? 1 : 0, //add noindex
'rcr_rel_stop' => isset($rcr_rel_stop)&&($rcr_rel_stop=='true') ? 1 : 0, //use stop rel value
'rcr_rel_val' => isset($rcr_rel_val) ? $rcr_rel_val : "",
'rcr_class_stop' => isset($rcr_class_stop)&&($rcr_class_stop=='true') ? 1 : 0, //use stop CSS class
'rcr_class_val' => isset($rcr_class_val) ? $rcr_class_val : "",
'rcr_stop' => isset($rcr_stop)&&($rcr_stop=='false') ? 0 : 1, //use stop list
'rcr_stop_list' => isset($rcr_stop_list) ? $rcr_stop_list : "yandex.ru,google.com" // stop list
);
############### PHP4 compatibility ###############
if (!function_exists("stripos")) {
function stripos($str,$needle,$offset=0)
{
return strpos(strtolower($str),strtolower($needle),$offset);
}
}
#################### FUNCTIONS ###################
function rcr_redirect()
{
global $rcr_opt,$modx;
$url=$_SERVER['REQUEST_URI'];
if(($url[0]!='/') and ($url[strlen($url)]!='/'))return;
$uarr=explode("/",$url);
if(!isset($rcr_opt['rcr_relink_val'])) return;
$incr = 0;
foreach ($uarr as $chpu) {
if ($chpu == $rcr_opt['rcr_relink_val']) {
$todo = '/^.*' . $chpu . '\//';
$link = preg_replace($todo,'',$url);
$link = str_replace("==/",'==',$link);
$rederectlink = html_entity_decode(rcr_crypt(base64_decode($link)));
if (preg_match('/^(https:|http:|ftp:)/i', $rederectlink)) $modx->sendRedirect($rederectlink,0,'REDIRECT_HEADER','HTTP/1.1 302 Found');
else $modx->sendRedirect($modx->config['site_url'].md5($rederectlink),0,'REDIRECT_HEADER','HTTP/1.0 404 Not Found');
exit;
}
$incr++;
}
}
function rcr_crypt($str)
{
global $rcr_opt;
if(empty($rcr_opt['secreet'])) return $str;
$key=str_pad('', strlen($str), $rcr_opt['secreet'], STR_PAD_RIGHT);
for($i=0;$i<strlen($str);$i++){
$str[$i] = chr(ord($str[$i]) ^ ord($key[$i]));
}
return $str;
}
function rcr_isstopwords($data)
{
global $rcr_opt;
if($rcr_opt['rcr_stop']){
$list = explode(",",$rcr_opt['rcr_stop_list']);
foreach($list as $sw)
if(stripos($data, trim($sw))!==false) return true;
}
return false;
}
function rcr_isstoprel($data)
{
global $rcr_opt;
if($rcr_opt['rcr_rel_stop']){
$needle = "rel=\"".$rcr_opt['rcr_rel_val']."\"";
if(stripos($data, $needle)!==false) return true;
$needle = "rel='".$rcr_opt['rcr_rel_val']."'";
if(stripos($data, $needle)!==false) return true;
}
if($rcr_opt['rcr_class_stop']){
$needle = "class=\"".$rcr_opt['rcr_class_val']."\"";
if(stripos($data, $needle)!==false) return true;
$needle = "class='".$rcr_opt['rcr_class_val']."'";
if(stripos($data, $needle)!==false) return true;
}
return false;
}
function rcr_iscanblank($data)
{
global $rcr_opt;
if (!$rcr_opt['rcr_blank']) return false;
if ((stripos($data, '.exe')!==false) or (stripos($data, '.zip')!==false) or
(stripos($data, '.rar')!==false) or (stripos($data, '.msi')!==false)) return false;
return true;
}
function rcr_encode($data)
{
global $rcr_opt, $modx;
$home = $modx->config['site_url'];
preg_match_all('#<a(?:.*?)href(?:\s*)=(?:\s*)[\"\']((https?|ftp):\/\/\S*?)[\"\']([^>]*)>(.*?)<\/a>#im',$data,$arr);
for ($i=0; $i<count($arr[0]); $i++) {
if(stripos($arr[1][$i],$home)!==0){
if(rcr_isstoprel($arr[0][$i])==false){
if(rcr_isstopwords($arr[1][$i])==false){
if (!stristr($arr[0][$i], 'javascript:')) {
$tmp = $arr[0][$i];
if($rcr_opt['rcr_comment_text']==true){
if(strpos($arr[4][$i],'<img')===false){
if (preg_match('/\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|]/im', $arr[4][$i])) $tmp = str_replace('>'.$arr[4][$i].'<','>'.$rcr_opt['rcr_comment_text_val'].'<',$tmp);
}
}
//$tmp = str_replace($arr[1][$i],$home.$rcr_opt['rcr_relink_val'].'/'.base64_encode(rcr_crypt($arr[1][$i])).'/',$tmp);
//Temus: broken external images
$tmp = substr_replace($tmp, $home.$rcr_opt['rcr_relink_val'].'/'.base64_encode(rcr_crypt($arr[1][$i])).'/', strpos($tmp, $arr[1][$i]), strlen($arr[1][$i]));
if(rcr_iscanblank($arr[0][$i])) {
$tmp = preg_replace('/target=["\'][^\'".]+["\']/', '', $tmp);
$tmp = str_replace('<a','<a target="_blank"',$tmp);
}
if($rcr_opt['rcr_nofollow']){
$tmp = preg_replace('/rel=["\'][^\'".]+["\']/', '', $tmp);
$tmp = str_replace('<a','<a rel="nofollow"',$tmp);
}
if($rcr_opt['rcr_noindex']){
$tmp = str_replace('</a>','</a></noindex>',$tmp);
$tmp = str_replace('<a','<noindex><a',$tmp);
}
$data = str_replace($arr[0][$i],$tmp,$data);
}
}
}else {
$tmp = preg_replace('/rel=["\'][^\'".]+["\']/', '', $arr[0][$i]);
$data = str_replace($arr[0][$i],$tmp,$data);
}
}
}
return $data;
}
################################################
switch($modx->Event->name) {
case 'OnWebPagePrerender' :
rcr_redirect();
$modx->documentOutput = rcr_encode(&$modx->documentOutput);
break;
}