Problems with HREF links

Hi. I have problems with href links .
When I click on a link href (eg tel . +59822000040 ) Adds the absolute url behind (eg ) . As a consequence the url is broken.
How I can remove the absolute url behind the href ?
Thank you!

i have the same problem.
i guess the problem might be in “function linkencode” in sendemaillib.php .

in my newsletter i want users to click on a phone-number like this
<a href="tel:+123456789">
,but this leads to a link looking more like that
<a href=">

mailto:-links work, maybe because there is a special handling in linkencode for these kind of links.
any workaround for clickable-phone-numbers?

@dwo How are you composing the campaign and creating the <a> element?

how should i ?

@dwo I mean in phplist. What do you do with the html that you created in notepad?

i create a new campaign and select “use a webpage as content”
(on my german installation the radio-button is called “Eine Webseite versenden”).
then i select the url where my previously with notepadd++ created html-document has been uploaded to (somewhere on an intranet-server).
is there something wrong with this procedure?

thanks for your help, duncanc!

There is a problem with the phplist code not handling a tel: scheme but seems to apply only when using a web page.

As an alternative you can copy/paste the complete html into the phplist editor when composing the campaign. Use the Source button so that you see the raw html

Also, on the Format tab, do not select a template.

@dwo I think that the code that has the problem is this in file admin/inc/maillib.php line 149

if (preg_match('#^(http|javascript|https|ftp|mailto):#i', $match)) {

try changing to

if (preg_match('#^(http|javascript|https|ftp|mailto|tel):#i', $match)) {

thanks a lot duncanc,
works wonderful with this change in maillib.php.

so i have to edit after every update now, or might this be fixed in newer version?
however - great work, thx!

@dwo I have submitted a change that should be in the next release of phplist

1 Like