VM's url matching is too greedy

Glynn Clements glynn at gclements.plus.com
Sun Sep 23 18:23:04 EDT 2007


skip at pobox.com wrote:

> 
> I can't figure out where it comes into play, but VM's notion of the extent
> of a URL is too greedy.  In the emails they send out, discussion forums
> often embed URLs in some [url]...[/url] tags, e.g.:
> 
>     [url]http://www.google.com/[/url]
> 
> VM highlights the trailing "[/url]" as part of the URL, so it sends too much
> to your browser if you click the highlighted text.  I'm using VM 7.17 in
> XEmacs 21.5.28.  I've never seen a situation where "[" appears unencoded in
> a URL, so even if it's valid to leave it unencoded I think you'd have fewer
> problems if you kept it out of the match set when looking for the end of the
> URL.

According to RFC 3986:

   A host identified by an Internet Protocol literal address, version 6
   [RFC3513] or later, is distinguished by enclosing the IP literal
   within square brackets ("[" and "]").  This is the only place where
   square bracket characters are allowed in the URI syntax.

So, http://[192.168.0.1]/ is technically valid (and works in Firefox),
but I've never seen the square brackets actually used.

-- 
Glynn Clements <glynn at gclements.plus.com>



More information about the XEmacs-Beta mailing list