Reputation: 6608
If I have the xml/html data to post we need to encode the data to avoid the XSS validation. So should we use HTMLencode or URI encoding for this.
If URI encoding is used will it cause issues as form POST automatically URI encode all the data before sending.
Upvotes: 0
Views: 703
Reputation: 149484
Remember: filter input, escape output.
Upvotes: 1
Reputation: 943100
XSS is a problem caused by giving tainted data to the client. It can't be solved at the point where data is posted.
To protect against it, HTML encode the data (immediately) before placing it in an HTML document.
Upvotes: 1