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">.
Comment | File | Size | Author |
---|---|---|---|
#2 | simplenews_statistics-fix_url_replace_attributes-2360003-2.patch | 734 bytes | kimwes |
Comments
Comment #1
kimwes CreditAttribution: kimwes commentedComment #2
kimwes CreditAttribution: kimwes commentedHere's a patch that keeps the existing attributes when replacing links.
Comment #3
dieuweGreat work, just tested this myself and it works like a charm.
Will commit to dev.
Comment #5
dieuwe