Simplenews statistics replaces all links for tracking purposes. Unfortunately it removes every html attribute before the href attribute in the replace process. This causes problems when end users only use wysiwyg editors and don't have the capability to manipulate the created html.
For example <a href='https://www.drupal.org'> is correctly replaced to <a href="http://localhost/track/click/1/0"> but <a style='text-decoration:none' href='https://www.drupal.org'> is replaced to <a href="http://localhost/track/click/1/0"> instead of expected <a style='text-decoration:none' href="http://localhost/track/click/1/0">.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

kimwes’s picture

Issue summary: View changes
kimwes’s picture

Status: Active » Needs review
FileSize
734 bytes

Here's a patch that keeps the existing attributes when replacing links.

dieuwe’s picture

Status: Needs review » Reviewed & tested by the community

Great work, just tested this myself and it works like a charm.

Will commit to dev.

  • dieuwe committed 0391aaf on 7.x-1.x authored by kimwes
    Issue #2360003 by kimwes: Fixed Parse links removes link attributes...
dieuwe’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.