title: Escape user-generated chat messages but render links
body: <p>User enter chat messages, which gets rendered directly to the page using Mustache templates. Obviously, HTML should be escaped to prevent HTML injection, but then again links should be rendered as <code>&lt;a href='...'&gt;</code>.</p>
  
  <p>There are different approaches I've tried to use <code>{{{ ... }}}</code> to return the unescaped HTML content, which means the link would get rendered and I need to take care of HTML escaping myself. Is there a safe way of doing that without relying on a half-baked solution I write myself?</p>
  
  <p><code>jQuery.text()</code> would be great, but I guess it will render the <code>&lt;a&gt;</code> again as text.</p>
  
  <p>What else can I do here?</p>