Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
);
Comment | File | Size | Author |
---|---|---|---|
#3 | simplenews_statistics.skip-absolute-urls.2256369.patch | 574 bytes | munkiepus |
Comments
Comment #1
kathyq CreditAttribution: kathyq commentedComment #2
dieuweHello,
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.
Comment #3
munkiepus CreditAttribution: munkiepus commentedHi, I've created a patch with the above change, attached,
cheers