I saw a lot of similar questions here, but no answer worked for me. I have a site (MVC4) with a search function, the search function should accept any character, but only the search form, the rest of the site should work with MVC4 default settings.
I tried the web.config bellow with no success.
<location path="Views/Search">
<system.web>
<httpRuntime requestValidationMode="2.0" requestPathInvalidCharacters="" />
<pages validateRequest="false" />
</system.web>
</location>
Also my Controller uses the attributes HttpGet and ValidateInput(false)
...
[HttpGet, ValidateInput(false)]
public ActionResult Search(string text)
{
...
What am I missing?
Edit: I'm using Razor 2