Peter Davis <>

r845030, r844709

r844709 | cmpilato | 2003-01-28 15:25:48 +0000 (Tue, 28 Jan 2003)

Patch by: Peter Davis <>

* subversion/include/svn_xml.h
* subversion/libsvn_subr/xml.c
  (xml_unescape, svn_xml_unescape_string,
  svn_xml_unescape_cstring, svn_xml_unescape_stringbuf):
  Delete unused xml_unescape functions as discussed in issue 1118.

r845030 | cmpilato | 2003-02-19 15:48:27 +0000 (Wed, 19 Feb 2003)

Split our XML encoding routines into two sets, those that work on
CDATA, and those that work on XML attributes.  This fixes issue #1118.

Patch by: Peter Davis <>
(Test suite tweak added by me.)

* subversion/include/svn_xml.h
  (svn_xml_escape_string, svn_xml_escape_cstring, 
    svn_xml_escape_stringbuf): Rename to svn_xml_escape_cdata_*.
  (svn_xml_escape_attr_string, svn_xml_escape_attr_cstring, 
    svn_xml_escape_attr_stringbuf): New.

* subversion/libsvn_subr/xml.c
  (xml_escape, xml_escape_cdata): Rename xml_escape to xml_escape_cdata.
  (svn_xml_escape_string, svn_xml_escape_cstring, 
    svn_xml_escape_stringbuf): Rename to svn_xml_escape_cdata_*, and 
    document that these are not suitable for escaping attribute values.
  (xml_escape_cdata): Don't escape single- and double-quotes.
  (xml_escape_attr, svn_xml_escape_attr_string, 
    svn_xml_escape_attr_cstring, svn_xml_escape_attr_stringbuf):
    New functions, like xml_escape_cdata* but suitable for attributes.

* subversion/mod_dav_svn/deadprops.c
* subversion/clients/cmdline/log-cmd.c
* subversion/libsvn_ra_dav/commit.c
* subversion/libsvn_ra_dav/fetch.c:
    Update callers of svn_xml_escape_* to use either svn_xml_escape_cdata_* 
    or svn_xml_escape_attr_* as appropriate.

* subversion/tests/clients/cmdline/
  (commit_uri_unsafe): Add a path with tabstops in it to this test.