You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Ben Collins-Sussman <su...@collab.net> on 2004/07/26 20:13:02 UTC

[Fwd: mod_dav_svn over-escapes index tag?]

-----Forwarded Message-----
From: Hiroharu Tamaru <ta...@myn.rcast.u-tokyo.ac.jp>
To: users@subversion.tigris.org
Subject: mod_dav_svn over-escapes index tag?
Date: Tue, 27 Jul 2004 05:00:43 +0900

Hello,

I run subversion 1.0.6 on mod_dav_svn/apache2/FreeBSD-stable.

I needed the following patch to correctly view the headings
(or whatever you would call it) of directory listings when
viewing the repository with a web browser (Mozilla).

It patches where the index tag such as

  <index rev="nn" path="/trunk/XXXX">

is generated for an xml response.  The strings that are
failing are multibyte utf8 japanese characters that are in
place of XXXXX above.  It gets escaped and shows up on
screen as-is, in %xx%xx%xx format.

Accroding to svnindex.xsl, the 'path' attribute for the
'index' tag is printed literally just like the 'name'
attribute for 'dir' or 'file' tag, and in contrast with the
'href' attribute.  Thus, it seems to me that the escaping is
unnecessary, or rather, unwanted.
(The name attrib is not escaped, whereas href attribute is,
and those are showing up fine; lines 2078 to 2093.)

Could some expert verify this?

Thanks in advance.

--- subversion/mod_dav_svn/repos.c-	Thu Apr  1 03:12:16 2004
+++ subversion/mod_dav_svn/repos.c	Thu May 27 02:05:20 2004
@@ -2051,7 +2051,7 @@
         if (href)
           ap_fprintf(output, bb, " path=\"%s\"",
                      apr_xml_quote_string(resource->pool,
-                                          ap_escape_uri(resource->pool, href),
+                                          href,
                                           1));
         ap_fputs(output, bb, ">\n");
       }


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

Re: [Fwd: mod_dav_svn over-escapes index tag?]

Posted by Hiroharu Tamaru <ta...@myn.rcast.u-tokyo.ac.jp>.
At Wed, 28 Jul 2004 23:56:58 +0200 (CEST),
Peter N. Lundblad wrote:
> 
> On Wed, 28 Jul 2004, Hiroharu Tamaru wrote:
> 
> > Hi, I got onto dev list as well,
> >
> > At Tue, 27 Jul 2004 17:22:56 -0700, Ben Reser <be...@reser.org> wrote:
> > > On Wed, Jul 28, 2004 at 12:21:20AM +0200, Peter N. Lundblad wrote:
> > > > On Mon, 26 Jul 2004, Ben Collins-Sussman wrote:
> > > >
> > > > > I run subversion 1.0.6 on mod_dav_svn/apache2/FreeBSD-stable.
> > > > >
> > > > > I needed the following patch to correctly view the headings
> > > > > (or whatever you would call it) of directory listings when
> > > > > viewing the repository with a web browser (Mozilla).
> > > > >
> > > > > It patches where the index tag such as
> > > > >
> > > > >   <index rev="nn" path="/trunk/XXXX">
> > > > >
> > > > > is generated for an xml response.  The strings that are
> > > > > failing are multibyte utf8 japanese characters that are in
> > > > > place of XXXXX above.  It gets escaped and shows up on
> > > > > screen as-is, in %xx%xx%xx format.
> > > > >
> > > > Yes. A path is not an URL. I think it's a bug. Will apply the patch that
> > > > removes URI-escaping if no one objects. If we want an URL, we need to add
> > > > an href attribute.
> > >
> > > Wasn't the change he's removing added to fix another bug?
> >
> > Yes, that was exactly what I was afraid of.
> > It was introduced in revision 6070, but to me the log message is not
> > clear enough as to decide on it.  So, I'd like some XML experts have
> > it verified.
> >
> Are you sure? AFAICT, what was introduced in 6070 was the XML escaping,
> which should stay. URI-escaping has been there from the beginning (r2297).

Oops. You are right, indeed.

> I think URI escaping should have been replaced with XML escaping in 6070.

I found what I was looking for.
r2392 unescaped the user visible part of 'file/dir' tag,
claiming to make them eyefriendly, but left the 'index' tag
untouched.  This is where the two categories of the tags
diverged.

I'd appreciate if you could commit the patch before your
next release.
-- 
Hiroharu Tamaru

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

Re: [Fwd: mod_dav_svn over-escapes index tag?]

Posted by "Peter N. Lundblad" <pe...@famlundblad.se>.
On Wed, 28 Jul 2004, Hiroharu Tamaru wrote:

> Hi, I got onto dev list as well,
>
> At Tue, 27 Jul 2004 17:22:56 -0700, Ben Reser <be...@reser.org> wrote:
> > On Wed, Jul 28, 2004 at 12:21:20AM +0200, Peter N. Lundblad wrote:
> > > On Mon, 26 Jul 2004, Ben Collins-Sussman wrote:
> > >
> > > > I run subversion 1.0.6 on mod_dav_svn/apache2/FreeBSD-stable.
> > > >
> > > > I needed the following patch to correctly view the headings
> > > > (or whatever you would call it) of directory listings when
> > > > viewing the repository with a web browser (Mozilla).
> > > >
> > > > It patches where the index tag such as
> > > >
> > > >   <index rev="nn" path="/trunk/XXXX">
> > > >
> > > > is generated for an xml response.  The strings that are
> > > > failing are multibyte utf8 japanese characters that are in
> > > > place of XXXXX above.  It gets escaped and shows up on
> > > > screen as-is, in %xx%xx%xx format.
> > > >
> > > Yes. A path is not an URL. I think it's a bug. Will apply the patch that
> > > removes URI-escaping if no one objects. If we want an URL, we need to add
> > > an href attribute.
> >
> > Wasn't the change he's removing added to fix another bug?
>
> Yes, that was exactly what I was afraid of.
> It was introduced in revision 6070, but to me the log message is not
> clear enough as to decide on it.  So, I'd like some XML experts have
> it verified.
>
Are you sure? AFAICT, what was introduced in 6070 was the XML escaping,
which should stay. URI-escaping has been there from the beginning (r2297).
I think URI escaping should have been replaced with XML escaping in 6070.

//Peter

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

Re: [Fwd: mod_dav_svn over-escapes index tag?]

Posted by Hiroharu Tamaru <ta...@myn.rcast.u-tokyo.ac.jp>.
Hi, I got onto dev list as well,

At Tue, 27 Jul 2004 17:22:56 -0700, Ben Reser <be...@reser.org> wrote:
> On Wed, Jul 28, 2004 at 12:21:20AM +0200, Peter N. Lundblad wrote:
> > On Mon, 26 Jul 2004, Ben Collins-Sussman wrote:
> > 
> > > -----Forwarded Message-----
> > > From: Hiroharu Tamaru <ta...@myn.rcast.u-tokyo.ac.jp>
> > > To: users@subversion.tigris.org
> > > Subject: mod_dav_svn over-escapes index tag?
> > > Date: Tue, 27 Jul 2004 05:00:43 +0900
> > >
> > > I run subversion 1.0.6 on mod_dav_svn/apache2/FreeBSD-stable.
> > >
> > > I needed the following patch to correctly view the headings
> > > (or whatever you would call it) of directory listings when
> > > viewing the repository with a web browser (Mozilla).
> > >
> > > It patches where the index tag such as
> > >
> > >   <index rev="nn" path="/trunk/XXXX">
> > >
> > > is generated for an xml response.  The strings that are
> > > failing are multibyte utf8 japanese characters that are in
> > > place of XXXXX above.  It gets escaped and shows up on
> > > screen as-is, in %xx%xx%xx format.
> > >
> > Yes. A path is not an URL. I think it's a bug. Will apply the patch that
> > removes URI-escaping if no one objects. If we want an URL, we need to add
> > an href attribute.
> 
> Wasn't the change he's removing added to fix another bug?  

Yes, that was exactly what I was afraid of.
It was introduced in revision 6070, but to me the log message is not
clear enough as to decide on it.  So, I'd like some XML experts have
it verified.

Nevertheless, as I wrote in the original message, the 'name' attribute
for 'dir' or 'file' tag is inconsistent with this 'path' attribute for
'index' tag, and I believe one or the other should be modified.

Anyway, thanks for looking into it.
-- 
Hiroharu Tamaru

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

Re: [Fwd: mod_dav_svn over-escapes index tag?]

Posted by Ben Reser <be...@reser.org>.
On Wed, Jul 28, 2004 at 12:21:20AM +0200, Peter N. Lundblad wrote:
> On Mon, 26 Jul 2004, Ben Collins-Sussman wrote:
> 
> > -----Forwarded Message-----
> > From: Hiroharu Tamaru <ta...@myn.rcast.u-tokyo.ac.jp>
> > To: users@subversion.tigris.org
> > Subject: mod_dav_svn over-escapes index tag?
> > Date: Tue, 27 Jul 2004 05:00:43 +0900
> >
> > I run subversion 1.0.6 on mod_dav_svn/apache2/FreeBSD-stable.
> >
> > I needed the following patch to correctly view the headings
> > (or whatever you would call it) of directory listings when
> > viewing the repository with a web browser (Mozilla).
> >
> > It patches where the index tag such as
> >
> >   <index rev="nn" path="/trunk/XXXX">
> >
> > is generated for an xml response.  The strings that are
> > failing are multibyte utf8 japanese characters that are in
> > place of XXXXX above.  It gets escaped and shows up on
> > screen as-is, in %xx%xx%xx format.
> >
> Yes. A path is not an URL. I think it's a bug. Will apply the patch that
> removes URI-escaping if no one objects. If we want an URL, we need to add
> an href attribute.

Wasn't the change he's removing added to fix another bug?  

-- 
Ben Reser <be...@reser.org>
http://ben.reser.org

"Conscience is the inner voice which warns us somebody may be looking."
- H.L. Mencken

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

Re: [Fwd: mod_dav_svn over-escapes index tag?]

Posted by "Peter N. Lundblad" <pe...@famlundblad.se>.
On Mon, 26 Jul 2004, Ben Collins-Sussman wrote:

> -----Forwarded Message-----
> From: Hiroharu Tamaru <ta...@myn.rcast.u-tokyo.ac.jp>
> To: users@subversion.tigris.org
> Subject: mod_dav_svn over-escapes index tag?
> Date: Tue, 27 Jul 2004 05:00:43 +0900
>
> I run subversion 1.0.6 on mod_dav_svn/apache2/FreeBSD-stable.
>
> I needed the following patch to correctly view the headings
> (or whatever you would call it) of directory listings when
> viewing the repository with a web browser (Mozilla).
>
> It patches where the index tag such as
>
>   <index rev="nn" path="/trunk/XXXX">
>
> is generated for an xml response.  The strings that are
> failing are multibyte utf8 japanese characters that are in
> place of XXXXX above.  It gets escaped and shows up on
> screen as-is, in %xx%xx%xx format.
>
Yes. A path is not an URL. I think it's a bug. Will apply the patch that
removes URI-escaping if no one objects. If we want an URL, we need to add
an href attribute.

Thanks for the patch, BTW.

Regards,
//Peter

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

Re: [Fwd: mod_dav_svn over-escapes index tag?]

Posted by Hiroharu Tamaru <ta...@myn.rcast.u-tokyo.ac.jp>.
At Mon, 2 Aug 2004 09:58:27 +0200 (CEST),
Peter N. Lundblad wrote:
> 
> On Mon, 26 Jul 2004, Ben Collins-Sussman wrote:
> 
> > -----Forwarded Message-----
> > From: Hiroharu Tamaru <ta...@myn.rcast.u-tokyo.ac.jp>
> > To: users@subversion.tigris.org
> > Subject: mod_dav_svn over-escapes index tag?
> > Date: Tue, 27 Jul 2004 05:00:43 +0900
> >
> > I run subversion 1.0.6 on mod_dav_svn/apache2/FreeBSD-stable.
> >
> > I needed the following patch to correctly view the headings
> > (or whatever you would call it) of directory listings when
> > viewing the repository with a web browser (Mozilla).
> >
> Commited in r10461. Thanks.

Thanks to you as well.

> BTW, next time you send a patch, please include a log message. No problem
> for this little one, but it makes life easier when evaluating/commiting
> patches.

OK, I will.
-- 
Hiroharu Tamaru

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

Re: [Fwd: mod_dav_svn over-escapes index tag?]

Posted by "Peter N. Lundblad" <pe...@famlundblad.se>.
On Mon, 26 Jul 2004, Ben Collins-Sussman wrote:

> -----Forwarded Message-----
> From: Hiroharu Tamaru <ta...@myn.rcast.u-tokyo.ac.jp>
> To: users@subversion.tigris.org
> Subject: mod_dav_svn over-escapes index tag?
> Date: Tue, 27 Jul 2004 05:00:43 +0900
>
> I run subversion 1.0.6 on mod_dav_svn/apache2/FreeBSD-stable.
>
> I needed the following patch to correctly view the headings
> (or whatever you would call it) of directory listings when
> viewing the repository with a web browser (Mozilla).
>
Commited in r10461. Thanks.

BTW, next time you send a patch, please include a log message. No problem
for this little one, but it makes life easier when evaluating/commiting
patches.

//Peter

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