Re: Prop: make URL's clickable



I have tried out the URL patch and I like it.  It works well. 

There is a small problem that I noticed.  You used the following regex to
match the URLs: 

((ht|f)tps?://[^[:blank:]\r\n]+).  

Unfortunatley, if there is a ")" or "]" at the end of the url, it gets
matched in the regex and the HTML page fails to be found because of the
mangled URL.  So, to fix this you should add brackets and parantheses to
regex, like this:

"((ht|f)tps?://[^[:blank:]\)\]\r\n]+)".  

Maybe consider adding all of the URL-illegal characters to this regex.

julian


On Tue, 08 May 2001 12:18:58 Albrecht Dreß wrote:
> Hi all!
> 
> I attach a patch (against today's cvs) which makes url's in mails
> clickable
> and calls the browser defined in the Gnome Control Center with it.
> 
> Basically, it scans mails for [s]http://... and [s]ftp:// entries, prints
> them
> in a different color, and uses gnome_url_show() to invoke the browser if
> the
> left mouse button is released over one of this entries. Changed files
> are---
> 
> * src/balsa-app.h: added field for url color
> * src/save-restore.c: save and restore this entry
> * src/pref-manager.c: add "Hyperlink color" in the Colors notebook
> * src/balsa-message.c: the stuff to detect and store url's, and to call
> the
> browser.
> 




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]