XML parsing breaks using escapes #2487
Comments
Author: TomH Can you clarify what the problem is? Are you saying that trying to upload that object results in an error? or that if you upload it and then download it again the backslash is lost? |
Author: stefan[at]konink.de I am trying to upload an object including the first above tag. That object returns an XML error. And the XML error clearly shows that it has lost the escaping slash. |
Author: stefan[at]konink.de ...and to be totally clear. If I replace it with a "bla '" sequence it works. |
Author: tom[at]compton.nu What does the error say exactly? Presumably it doesn't just quote the XML but has some sort of error message? |
Author: stefan[at]konink.de Uploaded: Error: |
Author: stefan[at]konink.de Interesting now I see that the error that I made up actually has the \ so probably someone is working on it. |
Author: tom[at]compton.nu Nobody is working on anything... One for you I guess zere? |
Author: stefan[at]konink.de Lets say I expect this difference is between a /create vs an update. |
Author: Matt i've tested the code for both create and update and, for me, they both return the same error message with the correct escaping. if you can still reproduce this difference, it would help us a lot if you could post a trace of the relevant parts of the server conversation (e.g: curl --trace). i'm sure you already know this, but backslashes do not escape chars in XML attributes. instead to escape the single quote use '. the original error is due to the XML parser terminating on the minus sign after the single quote after the backslash, as this is an invalid character in that context. |
Author: Matt closing because there doesn't seem to be a reproducible issue here. |
Reporter: stefan[at]konink.de
[Submitted to the original trac issue database at 8.03pm, Saturday, 21st November 2009]
The following is send to the API
<tag k='name' v='Lijn 31 van DEN HAAG naar NAALDWIJK via MONSTER en 's-GRAVENZANDE' />
This comes back in the XML error:
<tag k='name' v='Lijn 31 van DEN HAAG naar NAALDWIJK via MONSTER en 's-GRAVENZANDE' />
Escape chars shouldn't be ignored.
The text was updated successfully, but these errors were encountered: