Hi All,
We have one web form having many textboxes. Each is having some character limit as per business needs. To handle Cross Site Scripting, we are using
1) HTMLEncode - while fetching data from user input,
2) store it in our custom document library &
3) HTMLDecode - while retrieving data from custom document library & set it on web page
Problem Statement:
A textbox having business need as 255 max characters. We have JavaScript validation in place which checks this. But after implementing HTMLEncode; the actual characters are getting increased.
e.g. If user is using symbol as < in textbox when we encode it; it's going as < so even if user is inputting 255 characters, in the background the total length is becoming more than 255 & throwing error & so not updating.
Can anyone please guide us in this?
Thanks,
Sanjay