title: encodeURIComponent() ignoring line breaks
body: <p>I'm trying to encode a string from a textarea so I can output the encoded result for a mailto link. Spaces and special characters are encoded fine but line break aren't, they just get encoded as a space. 
   How do I encode my line breaks?</p>
  
  <pre><code>if (id == 'subject' || id == 'body') {
              let str = output.innerText;
              str = encodeURIComponent(str);
              // str = str.replace(/\n/g, "%0A").replace(/ /g, "%20").replace(/&amp;/g, "%26");
              output.innerText = str;
          }
  </code></pre>
  
  <p>I've also tried this which doesn't work either: </p>
  
  <pre><code>str = encodeURIComponent(str).replace(/\n/g, '%0D%0A');
  </code></pre>
  
  <p>Here's how my output currently looks:</p>
  
  <pre><code>mailto:mckeever02@gmail.com?body=Testing%20Should%20be%20a%20line%20break%20before%20this%20sentence
  </code></pre>
  
  <p>Notice that line breaks are just being encoded to <code>%20</code> (space). Any ideas?</p>