title: ASP.NET MVC4 regular expression model validation attribute doesn't work client side with accented characters
body: <p>In an ASP.NET MVC 3 project I have a requirement to validate a name field in a view to allow a specific set accented characters. So in my view model I have an regular expression attribute defined on the appropriate property like this:</p>
  
  <pre><code>[RegularExpression("^[a-zA-Zá]{2,50}$")]
  </code></pre>
  
  <p>Please note this is not the exact code, it is simplified to make my problem easier to understand. </p>
  
  <p>This regular expression works fine server side, but doesn't work client side. If you view the HTML of the input field is contains this attribute:</p>
  
  <pre><code>data-val-regex-pattern="^[a-zA-Z&amp;amp;#225;]{2,50}$"
  </code></pre>
  
  <p>As you can see the accented character has been converted into a HTML entity which breaks the regular expression. Can anyone tell me why this is happening and how to fix it?</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>Apologies I am a complete moron. I had completely forgotten that we upgraded to MVC 4 beta a couple of days ago. Subsequently I've created a two small test projects, one in MVC 3 and one in MVC 4. The problem only exists in MVC 4.</p>