Skip to content Skip to sidebar Skip to footer

Whatsapp://send?text Cut String From '&' Character Till End?

I'm trying to add a link that can be shared in WhatsApp: For example: 'whatsapp://send?text=http://www.example.com/products/women/dresses?sessionid=34567&source=google.com' Bu

Solution 1:

It'll be cutting it off because an '&' denotes a new query string parameter. You can fix it by encoding the string parameter in your URL using the encodeURI JavaScript function. The & character will encode to "%26".


Post a Comment for "Whatsapp://send?text Cut String From '&' Character Till End?"