Page 1 of 1

Ampersand in link...

PostPosted: 1:46pm, Mon 20 Apr, 2015
by petersphilo
Hello all,

This is sort of an obscure question...
On a client's mailer, we include twitter and LinkedIn links that contain several fields, including the title of the mailer and a few words of the paragraph..

This works well, unless the title contains an ampersand like: The power of R&D

indeed, in the twitter link, it looks like this:
Code: Select all

Which works well when you're previewing the html before phplist imports it (i always create a web-page, then import it into phplist)

However, phplist translates that url encoded %26 back into an & before it stores it in MySQL, so, of course, when you click on the link in the mailer, the link breaks at the level of the & that should be a %26...

I guess my question is twofold:
- why would phplist do a urldecode when it stores the url in MySQL
- Does anyone know how i can modify phplist so that it stops performing this urldecode (which, i imagine, means also stopping it from performing a urlencode when it reads from MySQL)

I hope this makes sense to someone -- i realize my writing is unclear..
Thank you all!

Re: Ampersand in link...

PostPosted: 6:37pm, Mon 20 Apr, 2015
by duncanc
then import it into phplist

What do you mean by this? Possibly the url decoding is being done by this step.

Re: Ampersand in link...

PostPosted: 6:54am, Tue 21 Apr, 2015
by petersphilo
i always create a web page, then use the option to enter a url rather than compose the message directly within phplist...

Re: Ampersand in link...

PostPosted: 9:33am, Tue 21 Apr, 2015
by duncanc
I can repeat the problem by composing a new message in the editor.

An & in a url encoded as %26 is stored as a literal & in the linktrack_forward table. This appears to be a bug so I have raised it on Mantis