简体   繁体   中英

Allowing the specific format of email address in MVC input

I have a page in MVC where i want to take the email adddress as the input which can be of format like:" Jone Davi" <jone@gmail.com> , " Ben Miller" <ben@gmail.com> , " Jane Ton" <jane@gmail.com> ,

Then from this I want to parse the valid emailaddress.But on click of the submit button getting error message" A potentially dangerous Request.Form value was detected from the client "

Thus is there any way to take the input of email address in above format and bypass the security error for that specific page.

Thanks in advance.

You need to escape the angle-brackets. Use &lt; and &gt; instead.

Check out this article for more details on escaping HTML in ASP.net MVC.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM