Hi,
In my MVC app, I read data from a form using javascript and make a jQuery ajax call to my action method.
I'm testing sending data containing HTML tags in it but my action method is generating error because of the HTML tags. What's the right way of passing data in this scenario? Do I encode data in my javascript function before sending it to the backend?
I'm using AntiXss in the backend to sanitize data but the error is generated as soon as the data reaches my action method.
What is the standard and correct way of passing data from a JS/jQuery function to an action method?