I have a form element such as:
<input type="text" value="O’Reilly" />
But when this form is submitted, the value passed to the form handler is decoded and the ’ character is sent instead of the original string ’
I need to get the original string in it's literal/raw form, but I cannot seem to force the page to stop decoding these HTML elements for me. Any ideas?
HTML-encode the ampersand with &
to prevent it from being part of an escape sequence: <input type="text" value="O&rsquo;Reilly" />