title: Symfony 2.1+ encodes hash/pound "#" in routes
body: <p>I'm in the process of upgrading from Symfony 2.0 to 2.3. We have routes with hashes defined since we have a single page app.</p>
  
  <p>A route configured via annotations:</p>
  
  <pre><code>/**
   * @Route("/app#orders/{id}", name="app_order")
   */
  </code></pre>
  
  <p>We use Twig to generate emails and use these routes within the Twig templates:</p>
  
  <pre><code>&lt;a href="{{ url('app_order', { 'id': '123' }) }}"&gt;View order&lt;/a&gt;
  </code></pre>
  
  <p>Before upgrading, this worked fine. After the upgrade, the <code>#</code> gets encoded to <code>%23</code> but the slashes remain intact. This of course generates an invalid URL in the email.</p>
  
  <p>Why are only the hashes encoding and not the slashes? It should be all or nothing. What options do I have here other than doing a string replace?</p>
  
  <p>Things I've already tried doing which don't help:</p>
  
  <ul>
  <li>Setting autoescape to false <code>{% autoescape false %}</code></li>
  <li>Using raw <code>{{ url(...)|raw }}</code></li>
  <li>Using raw and autoescape=false in conjunction</li>
  </ul>