title: html - send link with multiple parameter using share via whatsapp and sms
body: <p>I am trying to send a message with a link to different products on my site using share via whatsapp and sms in mobile view. I am able to open both the apps and populate the text area.<br>
  The problem is that my link contains two parameters and everything from <code>&amp;</code> till the end doesn't get populated in the text field for both sms and whatsapp.<br>
  This  is my code -<br>
  HTML -  </p>
  
  <pre><code>&lt;div class="form-group mshare"&gt;
      &lt;a id="wshare" class="btn btn-default btn-block" data-action="share/whatsapp/share"&gt;
          &lt;i class="fa fa-whatsapp"&gt;&lt;/i&gt; Whatsapp
      &lt;/a&gt;
  &lt;/div&gt;
  &lt;div class="form-group mshare"&gt;
      &lt;a id="sshare" class="btn btn-default btn-block"&gt;
          &lt;i class="fa fa-envelope-o"&gt;&lt;/i&gt; SMS
      &lt;/a&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Javascript -  </p>
  
  <pre><code>$(document).ready(function(){
              $(document).on("click","#wshare",function(){
                  var id = $('#shprodid').val();
                  var name = $('#shprodnm').val();
                  var text = "Hey! Check out this "+name+" on mysite - http://example.com/single.php?pid="+id+"&amp;category=&lt;?php echo $cat; ?&gt;";
                  alert(text);
                  $(this).attr("href","whatsapp://send?text="+text);
              });
           });
  
          $(document).ready(function(){
              $(document).on("click","#sshare",function(){
                  var id = $('#shprodid').val();
                  var name = $('#shprodnm').val();
                  var text = "Hey! Check out this "+name+" on mysite - http://example.com/single.php?category=&lt;?php echo $cat; ?&gt;&amp;pid="+id;
                  $(this).attr("href","sms:?body="+text);
                  alert('clicked');
              });
           });
  </code></pre>
  
  <p>The desired output is -<br>
  Hey! Check out this watch on mysite - <a href="http://example.com/single.php?category=watches&amp;pid=1234" rel="nofollow">http://example.com/single.php?category=watches&amp;pid=1234</a>  </p>
  
  <p>The current output -<br>
  Hey! Check out this watch on mysite - <a href="http://example.com/single.php?category=watches" rel="nofollow">http://example.com/single.php?category=watches</a>  </p>