You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by "Peter N. Lundblad" <lu...@linux.nu> on 2004/04/07 14:10:08 UTC

[PATCH] Fix #1209 (fwd)

[Sorry if this comes through many times; I seem to have some problems with
my e-mail account]

Hi,

I think this fixes issue 1209.

Regards
//Peter

Fix #1209: dav_svn_deliver() is not doing any HTML or (real) XML
path escaping.

* subversion/mod_dav_svn/repos.c
(dav_svn_deliver): Escape filenames with entities when generating HTML.

Index: subversion/mod_dav_svn/repos.c
===================================================================
--- subversion/mod_dav_svn/repos.c	(revision 9287)
+++ subversion/mod_dav_svn/repos.c	(working copy)
@@ -2090,7 +2090,11 @@
         if (gen_html)
           name = href;

+	/* We quote special characters in both XML and HTML. */
+	name = apr_xml_quote_string(entry_pool, name, !gen_html);
+
         href = ap_escape_uri(entry_pool, href);
+	href = apr_xml_quote_string(entry_pool, href, 1);

         if (gen_html)
           {
@@ -2101,8 +2105,6 @@
         else
           {
             const char *const tag = (is_dir ? "dir" : "file");
-            name = apr_xml_quote_string(entry_pool, name, 1);
-            href = apr_xml_quote_string(entry_pool, href, 1);

             /* ### This is where the we could search for props */


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org