Modify ↓
Opened 15 years ago
Closed 14 years ago
#6657 closed defect (worksforme)
XML special symbols in ticket content lead to invalid XML in response
Reported by: | fazend | Owned by: | osimons |
---|---|---|---|
Priority: | high | Component: | XmlRpcPlugin |
Severity: | major | Keywords: | XML |
Cc: | Trac Release: | 0.11 |
Description
When a ticket content has &
(for example), than the ticket.get()
call will return an XML, which is invalid.
I suppose we should parse such symbols and convert them to proper XML entities.
Attachments (0)
Change History (2)
comment:1 Changed 14 years ago by
comment:2 Changed 14 years ago by
Resolution: | → worksforme |
---|---|
Status: | new → closed |
In [9262] I've added a functional test for this too, and I can see nothing wrong in the RPC implementation - or accessing it using Python xmlrpclib
. This must be an issue with some other client library.
Note: See
TracTickets for help on using
tickets.
I have a feeling this happens on the client side, and your library don't encode the received data back as it should before passing using it in new xml. At the server-side we use
xmlrpclib
to do this, and it works like this:So, before passing the content back you need to be sure it gets encoded by your client / library of choice. The server expects this to be encoded. I'm not sure what the error message on server is (haven't tested) but we could likely add a test for this just to see what happens :-)