title: Encoding special characters < and > in MVC parameters
body: <p>I am trying to encode <code>&lt;</code> and <code>&gt;</code> in a MVC parameter, tried using encodeURIComponent, however the decoding seem to occur prior to reaching the controller and it blows up the routing</p>
  
  <pre><code>public override void RegisterArea(AreaRegistrationContext context)
  {
      context.MapRoute(
          "Default",
          "Home/{controller}/{action}/{id}",
          new { action = "Index", id = UrlParameter.Optional }
      );
  }
  
  http://localhost/HomeStretch/Home/ListAll?Value=%22%7B%3Cdbid%3E%7BD576959C-31F8-469B-9C23-17B046DF590F%7D%3Cdbid%3E%7D%22"
  </code></pre>
  
  <p>If I take away the <code>&lt;&gt;</code> carets it works, if I leave them in the call fails. I can do my own silly conversion using a <code>*</code> instead of <code>%</code>, however I am wondering if there is a better way of getting around this?</p>
  
  <p>Turns out this maybe a security issue, I was scouring the event log and found below exception had been thrown. How do I properly insulate my tags, so this won't happen?</p>
  
  <pre><code>Exception information: 
      Exception type: HttpRequestValidationException 
      Exception message: A potentially dangerous Request.QueryString value was detected from the client (Filters[0].Value=""{&lt;dbid&gt;{D576959C-31F8...").
  at System.Web.HttpRequest.ValidateString(String value, String collectionKey, RequestValidationSource requestCollection)
  at System.Web.HttpValueCollection.GetValues(String name)
  </code></pre>