I admit we are doing something silly by using a url encoded form to send an XML document in a single variable (linefeeds converted to spaces, and content escaped), but this is to accommodate a client that can only send form data.
When one of the strings in the escaped XML content contained an apostrophe
'
the parsing of the request body stops and does not return the remainder of the variable. Of course, this creates a problem because the XML document we retrieve is incomplete.
What is the proper way to pass an apostrophe in a form parameter when the receiver is using the Apache Wink JAX-RS libraries?
A line like this:
<decisionspace title="Traffic Study" details="Discuss the Rivertowns Square projects impact on traffic" />
works fine, but a line like this:
<decisionspace title="Traffic Study" details="Discuss the Rivertowns Square project's impact on traffic" />
is truncated after "Square project"
The characters being escaped are:
"&" becomes "&"
"\"" (double quote) becomes """
"'" (single quote) becomes "'"
"<" becomes "<"
">" becomes ">"
bytes < 0x20 or > 0x7f" become "&#nnn;"