Ampersand in link...

Once you've installed phpList... ask questions here!
Forum rules
Please help the volunteers to help you by supplying the version of phpList you are using, browser & version and if possible, a link to your phpList installation.

Ampersand in link...

Postby petersphilo » 1:46pm, Mon 20 Apr, 2015

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
The+power+of+R%26D

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!
petersphilo
phpLister
 
Posts: 14
Joined: 9:21pm, Wed 08 Oct, 2014

Re: Ampersand in link...

Postby duncanc » 6:37pm, Mon 20 Apr, 2015

then import it into phplist

What do you mean by this? Possibly the url decoding is being done by this step.
duncanc
Moderator
 
Posts: 2440
Joined: 6:34am, Sat 08 May, 2010
Location: London

Re: Ampersand in link...

Postby petersphilo » 6:54am, Tue 21 Apr, 2015

i always create a web page, then use the option to enter a url rather than compose the message directly within phplist...
petersphilo
phpLister
 
Posts: 14
Joined: 9:21pm, Wed 08 Oct, 2014

Re: Ampersand in link...

Postby duncanc » 9:33am, Tue 21 Apr, 2015

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 https://mantis.phplist.com/view.php?id=17649
duncanc
Moderator
 
Posts: 2440
Joined: 6:34am, Sat 08 May, 2010
Location: London


Return to Questions and Problems after Installing

Who is online

Users browsing this forum: No registered users and 2 guests