title: Why linkify with textContent does not work
body: <p>Recently, I built a chat. The linkification of content typed into the textarea created some trouble.</p>
  
  <pre><code> if(!String.linkify) {
              String.prototype.linkify = function() {
  
                  // http://, https://, ftp://
                  var urlPattern = /\b(?:https?|ftp):\/\/[a-z0-9-+&amp;@#\/%?=~_|!:,.;]*[a-z0-9-+&amp;@#\/%=~_|]/gim;
  
                  // www. sans http:// or https://
                  var pseudoUrlPattern = /(^|[^\/])(www\.[\S]+(\b|$))/gim;
  
                  // Email addresses
                  var emailAddressPattern = /[\w.]+@[a-zA-Z_-]+?(?:\.[a-zA-Z]{2,6})+/gim;
  
                  return this
                      .replace(urlPattern, '&lt;a href="$&amp;"&gt;$&amp;&lt;/a&gt;')
                      .replace(pseudoUrlPattern, '$1&lt;a href="http://$2"&gt;$2&lt;/a&gt;')
                      .replace(emailAddressPattern, '&lt;a href="mailto:$&amp;"&gt;$&amp;&lt;/a&gt;');
              };
          }
  </code></pre>
  
  <ol>
  <li>Problem: Links in chatlog were not transformed, but appear a pure string.</li>
  <li>Problem: Links contain hidden characters â£<a href="https://www.link.com/product/ABC/myaffiliatelink" rel="nofollow noreferrer">https://www.link.com/product/ABC/myaffiliatelink</a>
  When i called the resulting links, I got the following browser notification:</li>
  </ol>
  
  <blockquote>
  <pre><code>  Not Found
      The requested URL â£https://www.link.com/product/ABC/myaffiliatelink was not found on this server.
  </code></pre>
  </blockquote>
  
  <p>To get the message, I use:</p>
  
  <pre><code>textContainer.textContent = message.linkify();
  </code></pre>
  
  <p>Can somebody explain what happens and how to fix this?</p>