title: Mailto: subject as a variable
body: <p>** EDIT: Thanks, Shivan Raptor! I kinda forgot about "encodeURIcomponent()"! **</p>
  
  <p>For some reason, I'm making a Javascript bookmarklet that quickly emails one of my two emails. (I'll just show the indented JS to make it easier, as I can convert it.) It uses a couple variables for the subject and body, which are inputted by prompts.</p>
  
  <pre><code>var address = confirm("School email?");
  
          var sub = prompt("What is the subject?");
  
          var bod = prompt("What would you like the message to read?");
  
          if(address == true) {
              window.location.assign("mailto:areiter@hightechhigh.org?Subject=sub&amp;body=bod");
              alert("Message sent to 'areiter@hightechhigh.org'.");
          }
          else {
              window.location.assign("mailto:burningphantom13@gmail.com?Subject=sub&amp;body=bod");
              alert("Message sent to 'areiter@hightechhigh.org'.");
          }
  </code></pre>
  
  <p>The only problem is that the variables "sub" and "bod" are what the subject and body appear as, respectively. So the code opens up Outlook, and has an email ready to be sent with the subject "sub" and "bod" in the body. Is there a way for the subject and body of a Javascript code to be the values of variables? Remember, it's going to be a bookmark, so there can't be any HTML.</p>