Template stripping out Whatsapp share code

Hi, the L&L template is stripping out some code from the Whatsapp social share HTML. The issue does not occur when using a standard HTML block.

<a href="whatsapp://send?text={Field url}" data-action="share/whatsapp/share" target="_blank"><i class="fab fa-whatsapp"></i></a>

For the code above the first ‘whatsapp’ text is being removed and is output as below.

<a href="//send?text=https://cutloosecrew.com/return-to-source-mixed-by-ripley/" data-action="share/whatsapp/share" target="_blank" rel="noopener"><i class="fab fa-whatsapp"></i></a>

Whatsapp share code seems to be unique as it does not have https:// at the start of the share link. :man_shrugging:

I don’t think this is an L&L issue, I just tried adding a URL with that structure to an a tag in the regular WordPress custom HTML block and it did the same thing and removed the whatsapp: part. I assume it’s because whatsapp:// isn’t a valid URL protocol but I’m unclear on exactly how that’s supposed to work so I’m not sure. I found this thread and this one that seem to contain other potential syntaxes you might try.

Thanks, the code below works and will share a post URL and title to Whatsapp:

<a href="https://api.whatsapp.com/send?text={Field title} {Field url}" data-action="share/whatsapp/share" target="_blank"><i class="fab fa-whatsapp"></i></a>

I searched around and tested this extensively before posting but the code in my original post may be outdated.

1 Like

Awww:) Thanks Mr. Phil for sharing.
I really appreciate it:)
It can be very useful in the future!


1 Like