To prevent a HttpRequestValidationException I httpEncode (using a javascript library) my input to send it to the server, where it is httpencoded again and stored. Then process it reversed to get it back, with an extra encode added if it's going into a label.
This seems to work fine but I get a HttpRequestValidationException if I put a single quote into my textbox. The httpEncode changes this to a '
which seems to be what it triggering the validation error. Is there a workaround? I can't afford to turn off page validation at the page level. Also, is this error likely to occur for other characters I haven't yet discovered?
Seems odd that it would choose that as potentially dangerous, when <html>
produces no validation problem. Also " encodes to "
without a problem.