WhatsApp cutting text after the equal character (=)

1

I noticed that WhatsApp Web, when forwarding a message via link, for example with the link below, it will cut the character = :

https://web.whatsapp.com/send?phone=551100000000&text=o%20valor%20é%20=%20100

The same does NOT occur when sharing is done by the mobile, where I use href="whatsapp: // send? text = value = $ 199.90 - Access the link: www.blabla.bla". >

Here is the code I use:

$(function() {
  $(".clickWhatsAppChat").click(function() {
    var PhoneNumber = "(11) 0000-00000";
    PhoneNumber = PhoneNumber.replace("+", "");
    PhoneNumber = PhoneNumber.replace(".", "");
    PhoneNumber = PhoneNumber.replace(" ", "");
    PhoneNumber = PhoneNumber.replace("-", "");
    PhoneNumber = PhoneNumber.replace("(", "");
    PhoneNumber = PhoneNumber.replace(")", "");
    if ($(window).width() < 768) {
      var confirma = confirm("Se você tiver o WhatsApp instalado, iniciará uma conversa com " + PhoneNumber + ".");
      if (confirma == true) {
        window.location.href = "https://api.whatsapp.com/send?phone=55" + PhoneNumber + "&text=valor=R$199,90";
      }
    } else {
      var confirma = confirm("Faça o login no WhatsApp Web e AGUARDE ALGUNS SEGUNDOS até que a coversa com " + PhoneNumber + " se inicie.");
      if (confirma == true) {
        window.open("https://web.whatsapp.com/send?phone=55" + PhoneNumber + "&text=valor=R$199,90", "_blank");
      }
    }
  });
});

Has anyone ever had the same difficulty? If yes, how to solve?

    
asked by anonymous 18.09.2018 / 22:14

0 answers