XML serializer can output invalid characters
|Reported by:||ris||Owned by:||nobody|
|Cc:||Triage Stage:||Ready for checkin|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Specifically Form Feed (0x0c), which is not allowed in XML. At all.
The problem is that saxutils' XMLGenerator is not safe against these characters and the result is having dumpdata output that loaddata can't reimport.
But I'm not sure what should be done about this though, because from what I've read, FF isn't even allowed to be numerically referenced in XML. So - should FFs just be silently swallowed? That doesn't seem right to me. Dumps are supposed to be perfect representations of the data.
Is this just a good reason not to use XML as a dump format?
(Noticed in 1.3, but code is the same in 1.4)
Change History (4)
comment:1 Changed 3 years ago by claudep
- Component changed from Core (Serialization) to Documentation
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
- Triage Stage changed from Unreviewed to Accepted
- Type changed from Uncategorized to Cleanup/optimization
comment:3 Changed 13 months ago by timgraham
- Component changed from Documentation to Core (Serialization)
- Triage Stage changed from Accepted to Ready for checkin