title: how keep entire link
body: <p>I found this code and is working fine, from messenger opens whatsapp sending pre-filled message.
  The problem is the link get cuts by =</p>
  
  <p>Link from Messenger run the script:
  <a href="https://website.com/ShareonWhatsApp.html?text=Hi%20how%20are%20You!%20https://m.me/7673?ref=test--12345" rel="nofollow noreferrer">https://website.com/ShareonWhatsApp.html?text=Hi%20how%20are%20You!%20https://m.me/7673?ref=test--12345</a></p>
  
  <p>Missing <strong>=test--12345</strong></p>
  
  <pre><code>&lt;body&gt;
  &lt;script type="text/javascript"&gt;
      function getQueryVariable(variable) {
          var query = window
              .location
              .search
              .substring(1);
          var vars = query.split("&amp;");
          for (var i = 0; i &lt; vars.length; i++) {
              var pair = vars[i].split("=");
              if (pair[0] == variable) {
                  return pair[1];
              }
          }
          return(false);
      }
      function _isMobile() {
          var isMobile = (/iphone|ipod|android|ie|blackberry/i).test(navigator.userAgent.toLowerCase());
          return isMobile;
      }
      if (_isMobile()) {
          location.assign("whatsapp://send?text=" + getQueryVariable("text"))
      } else {
          location.assign("http://web.whatsapp.com/send?text=" + getQueryVariable("text"))
      }
  &lt;/script&gt;
  Please close this window to get back to Messenger
  </code></pre>
  
  <p></p>