if-match error message needs to be XML-escaped
Using old ETag on changed resource returns:
<?xml version="1.0" encoding="utf-8" ?>
<error xmlns="DAV:">
<if-match/>Existing resource ETag of <<"bd210775b39d1d6e1d9d042cf06beb78">> does not match <<"588ad79f4ffc7398e83502ba2b0bf4c9">>
</error>
from IRC:
19:17 < mcrha> hi fsfs, I face another issue: https://paste.gnome.org/pbu3mrlnt
19:19 < mcrha> that is returned when I try outdated ETag in a PUT request. The XML is malformed, that
plain text should have escaped XML-significant letters, like those <<, >>, because
otherwise the libxml2 cannot parse it.
19:20 < mcrha> I do not have any hint (into the code) this time, I'm sorry. A quick fix might be to not
use '<<' '>>' for "highlighting" part of the text.
19:20 < mcrha> A longterm would be to escape those XML-significant letters when writing into the
element body.
19:22 < mcrha> libxml2 has xmlNewChild() and xmlNewTextChild(), where the later is what you are lookign
for. Maybe PHP has beside `new XMLElement()` something like `new XMLTextElement()` which
is suitable for the 'DAV:error' element better, I believe.
19:22 < mcrha> but I do not know PHP that well.