Discussion:
'#' in file url
corvid
2012-11-07 03:20:20 UTC
Permalink
I had two files with '#' in their names that I wanted to view --
file#1.png and file#2.png -- and dillo showed me the same file in
each tab.
Jorge Arellano Cid
2012-11-07 15:14:46 UTC
Permalink
Post by corvid
I had two files with '#' in their names that I wanted to view --
file#1.png and file#2.png -- and dillo showed me the same file in
each tab.
That's because '#' is not a valid character inside a URL.

Technically:

/*
* Regular Expression as given in RFC3986 for URL parsing.
*
* ^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?
* 12 3 4 5 6 7 8 9
*
* scheme = $2
* authority = $4
* path = $5
* query = $7
* fragment = $9
*
[...]

i.e. anything after '#' is a 'fragment'.

and BTW, that's why the file dpi escapes '#' as '%23' to be able
to show the file.

HTH.
--
Cheers
Jorge.-
corvid
2012-11-07 17:41:12 UTC
Permalink
Post by Jorge Arellano Cid
Post by corvid
I had two files with '#' in their names that I wanted to view --
file#1.png and file#2.png -- and dillo showed me the same file in
each tab.
That's because '#' is not a valid character inside a URL.
[snip]
Post by Jorge Arellano Cid
i.e. anything after '#' is a 'fragment'.
and BTW, that's why the file dpi escapes '#' as '%23' to be able
to show the file.
Right, it may be %23 at some point in its journey, but it's back to
'#' eventually -- and breaks.
Jorge Arellano Cid
2012-11-07 19:39:00 UTC
Permalink
Post by corvid
Post by Jorge Arellano Cid
Post by corvid
I had two files with '#' in their names that I wanted to view --
file#1.png and file#2.png -- and dillo showed me the same file in
each tab.
That's because '#' is not a valid character inside a URL.
[snip]
Post by Jorge Arellano Cid
i.e. anything after '#' is a 'fragment'.
and BTW, that's why the file dpi escapes '#' as '%23' to be able
to show the file.
Right, it may be %23 at some point in its journey, but it's back to
'#' eventually -- and breaks.
I tried:

$ echo "hello" > /tmp/a#b
$ dillo /tmp
<click on the file link>

and it works.
--
Cheers
Jorge.-
corvid
2012-11-07 20:05:54 UTC
Permalink
Post by Jorge Arellano Cid
Post by corvid
Post by Jorge Arellano Cid
Post by corvid
I had two files with '#' in their names that I wanted to view --
file#1.png and file#2.png -- and dillo showed me the same file in
each tab.
That's because '#' is not a valid character inside a URL.
[snip]
Post by Jorge Arellano Cid
i.e. anything after '#' is a 'fragment'.
and BTW, that's why the file dpi escapes '#' as '%23' to be able
to show the file.
Right, it may be %23 at some point in its journey, but it's back to
'#' eventually -- and breaks.
$ echo "hello" > /tmp/a#b
$ dillo /tmp
<click on the file link>
and it works.
If you make two files, a#1 and a#2, then run
dillo a#1 a#2
you won't be shown two different files.
Jorge Arellano Cid
2012-11-08 01:14:17 UTC
Permalink
Post by corvid
Post by Jorge Arellano Cid
Post by corvid
Post by Jorge Arellano Cid
Post by corvid
I had two files with '#' in their names that I wanted to view --
file#1.png and file#2.png -- and dillo showed me the same file in
each tab.
That's because '#' is not a valid character inside a URL.
[snip]
Post by Jorge Arellano Cid
i.e. anything after '#' is a 'fragment'.
and BTW, that's why the file dpi escapes '#' as '%23' to be able
to show the file.
Right, it may be %23 at some point in its journey, but it's back to
'#' eventually -- and breaks.
$ echo "hello" > /tmp/a#b
$ dillo /tmp
<click on the file link>
and it works.
If you make two files, a#1 and a#2, then run
dillo a#1 a#2
you won't be shown two different files.
Please check the committed patch.
--
Cheers
Jorge.-
corvid
2012-11-08 01:46:52 UTC
Permalink
Post by Jorge Arellano Cid
Please check the committed patch.
I added the change for the open file dialog as well...

Loading...