Currently, this function applies string replace for any URLs, including URL which is already absolute. Adding following if statement (line 169) before applying preg_replace will fix the issue:

if (!preg_match('/http/', $body)){
$body = preg_replace(
'/(src|href)=(\'|")\//', '$1=$2' . url('', array('absolute' => TRUE)), $body
);

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

kathyq’s picture

Issue summary: View changes
dieuwe’s picture

Title: function _simplenews_statistics_absolute(&$body) should skip URLs which is already absolute » Function _simplenews_statistics_absolute(&$body) should skip URLs which are already absolute
Status: Active » Needs work

Hello,

The D6 version is currently not maintained by anyone (I've only got time to work on D7 at the moment), but if you were to create a patch then I would be happy to commit it.

munkiepus’s picture

Hi, I've created a patch with the above change, attached,

cheers