[Orca-users] Strange File Names Revisited
Alex Kiernan
alex.kiernan at gmail.com
Mon Aug 22 21:48:05 PDT 2005
On 22/08/05, Alex Kiernan <alex.kiernan at gmail.com> wrote:
> On 21/08/05, Blair Zajac <blair at orcaware.com> wrote:
> > > If you're using IE, it doesn't like those `\'s (it turns them around
> > > into `/'s), this is the patch I'm using:
> > >
> > > Index: lib/Orca/Utils.pm
> > > ===================================================================
> > > RCS file: /cvsroot/upstream/orca/lib/Orca/Utils.pm,v
> > > retrieving revision 1.1.1.6
> > > retrieving revision 1.5
> > > diff -u -r1.1.1.6 -r1.5
> > > --- lib/Orca/Utils.pm 11 Jul 2005 05:21:08 -0000 1.1.1.6
> > > +++ lib/Orca/Utils.pm 22 Jul 2005 07:55:03 -0000 1.5
> > > @@ -110,6 +110,7 @@
> > > my ($name, $postfix_length) = @_;
> > >
> > > $name =~ s/:/_/g;
> > > + $name =~ s/\\/\//g;
> > > $name =~ s:/:_per_:g;
> > > $name =~ s:\s+:_:g;
> > > $name =~ s:%:_pct_:g;
> >
> > This will work, but in the end, a \ becomes a / which is replaced with a
> > _per_, which changes the meaning of the URL (for those who read the URLs
> > :) ). We should change the \ into something else.
> >
> > Does IE change the %xx equivalent of the \?
> >
>
> I don't think so, but I can't check just at the moment.
>
Just checked... if you change the substitution to %5C, you get
filenames on disk which are ...%5C..., but IE then evaluates the %5C
and requests the file as ...\... So it still doesn't work, but it does
fail differently!
--
Alex Kiernan
More information about the Orca-users
mailing list