phplist

NOTE:: Before reporting an issue, make sure you are running the latest version, currently 3.3.1


View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007797phplist applicationClick Trackingpublic10-09-06 19:4726-03-13 12:52
Reporterdpicon 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version2.11.7 
Target Version2.11.8Fixed in Version2.11.8 
Summary0007797: <area links do not work with CLICKTRACK.
DescriptionHi!

I found the link track does not work with area links.

Please read my following post for more info, and "fixing" code.

http://forums.phplist.com/viewtopic.php?t=6349 [^]

Thanks for PHPlist!
David.
TagsNo tags attached.
Attached Files

- Relationships
related to 0002705closed PHPList v2.11 release 
has duplicate 0006611new Click tracking does not work with image maps 

-  Notes
(0051003)
h2b2 (manager)
10-05-10 23:08

related to http://forums.phplist.com/viewtopic.php?p=36971#p36971 [^]
(0051922)
duncanc (developer)
27-11-12 18:21

The problem still exists in 2.10.x and 2.11.7 releases.

The cause is the regular expression used to match a elements, line 454 of file admin/sendemaillib.php for release 2.11.7

preg_match_all('/<a(.*)href=["\'](.*)["\']([^>]*)>(.*)<\/a>/Umis',$htmlmessage,$links);

The leading <a(.*) will match any element that begins with a, not just the a elements. In my case it was matching an area element and then the regex swallows everything up to the end of the next a element.

A solution is to match on white-space after the a

preg_match_all('/<a(\s+.*)href=["\'](.*)["\']([^>]*)>(.*)<\/a>/Umis',$htmlmessage,$links);

Tested and works.
(0051924)
michiel (manager)
27-11-12 20:26


yes, or maybe just one space:

preg_match_all('/<aSPACE(.*)href

but your tests, do they make the AREAs trackable, or is the issue that AREA links get broken, and this won't break them?

(0051983)
michiel (manager)
26-03-13 12:52

this will avoid the regex matching <area, which means that tracking <area is still something to deal with.


Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker