#408126 URL parsing doesn't handle UTF-8 characters

Package:
urlscan
Source:
urlscan
Submitter:
Martin Michlmayr
Date:
2026-08-18 14:25:04 UTC
Severity:
normal
Tags:
#408126#5
Date:
2007-01-23 17:17:14 UTC
From:
To:
I don't know where this is going but... urlscan doesn't handle URLs
that contain UTF-8 characters.  I just received an email which
contains the following URL which urlscan fails to parse correctly:
http://www.pantherhouse.com/newshelton/my-wife-thinks-i’m-a-swan/
When I paste it into Firefox directly, it successfully opens
http://www.pantherhouse.com/newshelton/my-wife-thinks-i%E2%80%99m-a-swan/

I'm not quite sure how to handle this since it essentially means that
virtually any character can appear in an URL.  Maybe you have a good
idea.

#408126#10
Date:
2007-01-27 05:04:04 UTC
From:
To:
On Tue, Jan 23, 2007 at 05:17:14PM +0000, Martin Michlmayr <tbm@cyrius.com> was heard to say:

  Ick.  Is that even a legal URL?

  One idea would be to use an exclusive, rather than inclusive, regexp
to find URLs.  Consider a URL to be anything starting with "http" and
terminated by whitespace or a few special characters (say, ["',.?>]).
This seems more failure-prone, though, as I can't possibly predict every
convention people use to terminate URLs (e.g., what about » or ¿; I'm
sure there are more I don't know).

  Another option would be to add a command to "lengthen" a match, telling
urlscan to update the currently selected match with the immediately
following character (or maybe the next character & everything else that
looks like part of a URL).  This might be the best solution, since weird
URLs like that seem like an oddity, and urlscan will probably make
inevitable errors in other situations anyway.

  Daniel

#408126#15
Date:
2007-01-27 19:07:20 UTC
From:
To:
* Daniel Burrows <dburrows@debian.org> [2007-01-26 21:04]:

I have no idea, but it works when I paste it into Firefox.

Yes, I agree that it'll be hard to get it right all the time.  I'd
personally assume that ' was part of the URL but for example » isn't;
but I might be wrong, and any rule you put into urlscan will get it
wrong in some cases. :/

Something like this would probably be best.

#408126#30
Date:
2026-08-18 14:22:52 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
urlscan, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 408126@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Marcin Kulisz <debian@kulisz.net> (supplier of updated urlscan package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Tue, 18 Aug 2026 14:45:53 +0100
Source: urlscan
Architecture: source
Version: 1.1.2-1
Distribution: unstable
Urgency: medium
Maintainer: Marcin Kulisz <debian@kulisz.net>
Changed-By: Marcin Kulisz <debian@kulisz.net>
Closes: 408126 893399 1066992
Changes:
 urlscan (1.1.2-1) unstable; urgency=medium
 .
   * New upstream version 1.1.2 (Closes: 1066992, 893399, 408126)
   * Removing hatch-vcs from build-deb upstream is not using it anymore
   * Removing d/control files already provied by dpkg =< 1.22.13
   * d/watch bumpup to version 5
Checksums-Sha1:
 bb720abf0eaef8815b5fcb69f9971b2c43c61a66 2035 urlscan_1.1.2-1.dsc
 91e557d24a57326aafc455d9934fc50053686f9f 39714 urlscan_1.1.2.orig.tar.gz
 5246e26f89b9f686d4566b91d32c13642c1e5034 4956 urlscan_1.1.2-1.debian.tar.xz
Checksums-Sha256:
 cb43cf47256cec234deeb883694ac28649471282f4244692ba0af00bebaa25b8 2035 urlscan_1.1.2-1.dsc
 8ea3e443633bddb47e3149d3ddd0819d5f51fffc5e7c59db0a1f31c82646043b 39714 urlscan_1.1.2.orig.tar.gz
 2e3b53aa2e89f3304e90603b6189467dd02bcaa546f2531ce13062a1881dff02 4956 urlscan_1.1.2-1.debian.tar.xz
Files:
 441c5a2903341d858d98931878e3ba96 2035 mail optional urlscan_1.1.2-1.dsc
 dc21d1879ffbfef5267065ac4661bc51 39714 mail optional urlscan_1.1.2.orig.tar.gz
 bf015f0db4c7c0340a80f6bb120f0520 4956 mail optional urlscan_1.1.2-1.debian.tar.xz
-----BEGIN PGP SIGNATURE-----

iQJGBAEBCgAwFiEEPfGk38cyRog4vPEhaGkw3VjDOLMFAmqEYssSHGRlYmlhbkBr
dWxpc3oubmV0AAoJEGhpMN1YwzizYXwP/0vunbmYCe/d/G7vgvJj3vXVzYINq1EE
/+P0Mvz1iotwrvuoZdIrxhqLY8segx0icsXweVaFz2d3l+Mia6ByPBj1OJaLIFuM
G0wE9gPB6keBSXulpf/YPUiWUMNgzdrBbe4/+QO1vaO4gYX8hK8q4Rob2WH4Ztd8
GFh4QNNrnFkHqtHpysqqwDPLBCxrX/PnwwrC6ygfedT2UD9/eCKvLqlEzD/ZitPr
I3/774M+JW8jyh39X8CIfgzsmbs0Kuv9zMYt3TnPnonPN1+gr+oTcffZVndMiUgX
/7oEOZ3W2ai8dg/mCInAfVSfMzmlpsBVIujRd6ksoWWuTG+2kRfKQ1fko6U5tH70
2+RYANlCHAn3hUKzDGZeffrM5g4f0t4D3tG8HRX0qynfU2DFaE9ST2Pp7JkVsmnD
/WFO/3DRYErRRjA4YYpI48RsnvHztjzykhEa1YjE6Sj8e3HKirG7QpHNWA6a+alw
0XFFCY167Iofps/USKCljXh2Eq+9UB5jnoTFnuJoX35sqJ5ERtadVCCuaYzTLFLp
Ll764ElTd89lSHqQPgVX46mEEaLDUsqvy9U/rmrmwdceWcaRkLgZYQ7E6c+qWZIo
ByO2+8Be1ll6tjgNZsWiaJlTypAtRZV82R/NGNhWNNz21WAk6rjHCkCENSwU4E4L
TQ6EQbpaXpy7
=EA1o
-----END PGP SIGNATURE-----