View Issue Details

IDProjectCategoryView StatusLast Update
0019555phpList 3 applicationOtherpublic03-12-18 14:26
Reporterduncanc 
PrioritynormalSeverityminorReproducibilitysometimes
Status resolvedResolutionfixed 
Product Version3.3.5 
Target Version3.3.7Fixed in Version 
Summary0019555: URL is truncated when click tracking is enabled
DescriptionA problem was reported with a link URL being truncated when click tracking is enabled
https://discuss.phplist.org/t/link-tracking-with-google-maps-pages/4630

The URL is to a google maps page and is quite lengthy but there appear to be two aspects of the URL that cause phplist to corrupt the value that is stored in the linktrack_forward table - it contains a single-quote and contains a comma.

There are a few places where the message html is parsed with regular expressions to identify links and their href attribute, e.g.
        preg_match_all('/<a (.*)href=["\'](.*)["\']([^>]*)>(.*)<\/a>/Umis', $htmlmessage, $links);

The regex is too lax regarding the delimiters. Either both should be single-quote or both should be double-quote. Currently it will treat a single quote in the href attribute value as the terminating delimiter.

The second problem is when the plain text message is parsed to find URLs. In this case the regex doesn't allow a comma within the URL, so the URL is truncated.
TagsNo tags attached.

Activities

duncanc

12-11-18 21:24

developer   ~0061369

See https://github.com/phpList/phplist3/pull/436

michiel

13-11-18 22:30

manager   ~0061379

Ah, you put some more explanation here, thanks.

This sounds like a good plan, so I'd be happy to merge it. Just wondering how much testing has been done.