CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • CiviMail link tracking is case sensitive - fails on uppercase link tag param (?)
Pages: [1]

Author Topic: CiviMail link tracking is case sensitive - fails on uppercase link tag param (?)  (Read 1669 times)

Chris Burgess

  • Ask me questions
  • ****
  • Posts: 675
  • Karma: 59
CiviMail link tracking is case sensitive - fails on uppercase link tag param (?)
August 31, 2008, 05:37:04 pm
We have users pasting HTML in which has been composed externally (using various HTML editing tools). This is CiviCRM 2.0.4.

Some of the tag params are uppercase and some lowercase. CiviMail appears sensitive to uppercased parameters on links, so this input:
Code: [Select]
<ul>
<li><a href='http://google.co.nz'>This link works</a></li>
<li><A HREF='http://google.co.nz'>This link won't</A></li>
<li><A HREF='http://yahoo.co.nz'>This link doesn't</A></li>
<li><a href='http://yahoo.co.nz'>This link does</a></li>
</ul>

Results in this output:
Code: [Select]
<ul>
<li><a href='http://www3.greens.org.nz/sites/all/modules/civicrm/extern/url.php?u=4366&qid=170776'>This link works</a></li>
<li><A http://www3.greens.org.nz/sites/all/modules/civicrm/extern/url.php?u=4367&qid=170776>This link won't</A></li>
<li><A http://www3.greens.org.nz/sites/all/modules/civicrm/extern/url.php?u=4367&qid=170776>This link doesn't</A></li>
<li><a href='http://www3.greens.org.nz/sites/all/modules/civicrm/extern/url.php?u=4366&qid=170776'>This link does</a></li>
</ul>

Seems like it just needs a case-insensitive regex in CRM_Mailing_BAO_Mailing::getPatterns() ? Interesting that the output actually replaced the first Yahoo! (third item) with the second Google URL also.

(Yes, lowercase tags are "more correct", but our staff are already familiar with specific HTML editing tools, and those tools have worked previously to generate mailouts.)
« Last Edit: August 31, 2008, 09:35:01 pm by xurizaemon »
@xurizaemon ● www.fuzion.co.nz

Chris Burgess

  • Ask me questions
  • ****
  • Posts: 675
  • Karma: 59
Re: CiviMail link tracking is case sensitive
August 31, 2008, 06:16:54 pm
Interesting ... a second copy of the same mail above I received was like this:
Code: [Select]
<ul>
<li><a href='http://www3.greens.org.nz/sites/all/modules/civicrm/extern/url.php?u=4366&qid=170773'>This link works</a></li>
<li><A href='http://www3.greens.org.nz/sites/all/modules/civicrm/extern/url.php?u=4367&qid=170773'>This link won't</A></li>
<li><A http://www3.greens.org.nz/sites/all/modules/civicrm/extern/url.php?u=4367&qid=170773>This link doesn't</A></li>
<li><a href='http://www3.greens.org.nz/sites/all/modules/civicrm/extern/url.php?u=4366&qid=170773'>This link does</a></li>
</ul>

Same mailout, different recipients ... wierd.
@xurizaemon ● www.fuzion.co.nz

Chris Burgess

  • Ask me questions
  • ****
  • Posts: 675
  • Karma: 59
Re: CiviMail link tracking is case sensitive - fails on uppercase link tag param (?)
September 01, 2008, 01:45:47 am
Opened an issue in JIRA and filed a patch which appears to fix it.

http://issues.civicrm.org/jira/browse/CRM-3484
@xurizaemon ● www.fuzion.co.nz

pankaj

  • Guest
Re: CiviMail link tracking is case sensitive - fails on uppercase link tag param
September 01, 2008, 02:38:40 am
Thanks Xurizaemon,

Patch is fine. Commited for 2.1.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • CiviMail link tracking is case sensitive - fails on uppercase link tag param (?)

This forum was archived on 2017-11-26.