Last post Jun 17, 2016 12:10 PM by jeff_liu
Jun 17, 2016 09:15 AM|Jeff_Liu|LINK
In the AspNet namespace, we have "Server.HtmlEncode()" function. What's it equivalence in the AspNetCore namespace? And where can I find this library?
Thanks a lot!
Jun 17, 2016 09:58 AM|maherjendoubi|LINK
Yon can find it here : http://packagesearch.azurewebsites.net/?q=HTMLEncode
Jun 17, 2016 10:01 AM|Mikesdotnetting|LINK
In RC 2, you need to add the following to your controller/class:
And then you can do the following:
var encodedOutput = HtmlEncoder.Default.Encode("some string");
Obvious, really ;)
Jun 17, 2016 12:10 PM|Jeff_Liu|LINK
Thank you guys! Thank you for your prompt, correct, and thorough answers! I appreciate it!