title: How to use HTML5 pattern attribute in Pug (Jade) template
body: <p>With Pug (previously named Jade) templating engine, how can I use the <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-pattern" rel="nofollow noreferrer">pattern attribute</a> of an input ?</p>
  <p>When I use a pattern like:</p>
  <pre><code>input( type=&quot;tel&quot;, pattern=&quot;\d{7}&quot; )
  </code></pre>
  <p>the rendered pattern is:</p>
  <pre><code>&lt;input type=&quot;tel&quot; pattern=&quot;d{7}&quot;&gt;
  </code></pre>
  <p>I also tried with the <a href="http://jade-lang.com/reference/attributes/#unescaped" rel="nofollow noreferrer">unescaped attribute</a> <strong>!=</strong> but it still escapes the <code>\</code> character.</p>
  <p>Note: it works perfectly with <code>pattern=&quot;[0-9]{7}&quot;</code>.</p>