|
|
@ -607,6 +607,7 @@ function rcmail_wash_html($html, $p = array(), $cid_replaces)
|
|
|
|
$html = '<head></head>'. $html;
|
|
|
|
$html = '<head></head>'. $html;
|
|
|
|
$html = substr_replace($html, '<meta http-equiv="Content-Type" content="text/html; charset='.RCMAIL_CHARSET.'" />', intval(stripos($html, '<head>')+6), 0);
|
|
|
|
$html = substr_replace($html, '<meta http-equiv="Content-Type" content="text/html; charset='.RCMAIL_CHARSET.'" />', intval(stripos($html, '<head>')+6), 0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// turn relative into absolute urls
|
|
|
|
// turn relative into absolute urls
|
|
|
|
$html = rcmail_resolve_base($html);
|
|
|
|
$html = rcmail_resolve_base($html);
|
|
|
|
|
|
|
|
|
|
|
@ -1086,8 +1087,8 @@ function rcmail_resolve_base($body)
|
|
|
|
$replacer = new rcube_base_replacer($regs[2]);
|
|
|
|
$replacer = new rcube_base_replacer($regs[2]);
|
|
|
|
|
|
|
|
|
|
|
|
// replace all relative paths
|
|
|
|
// replace all relative paths
|
|
|
|
$body = preg_replace_callback('/(src|background|href)=(["\']?)([\.\/]+[^"\'\s]+)(\2|\s|>)/Ui', array($replacer, 'callback'), $body);
|
|
|
|
$body = preg_replace_callback('/(src|background|href)=(["\']?)([^"\'\s]+)(\2|\s|>)/Ui', array($replacer, 'callback'), $body);
|
|
|
|
$body = preg_replace_callback('/(url\s*\()(["\']?)([\.\/]+[^"\'\)\s]+)(\2)\)/Ui', array($replacer, 'callback'), $body);
|
|
|
|
$body = preg_replace_callback('/(url\s*\()(["\']?)([^"\'\)\s]+)(\2)\)/Ui', array($replacer, 'callback'), $body);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return $body;
|
|
|
|
return $body;
|
|
|
|