[haiku-commits] Re: haiku: hrev50089 - src/apps/people

  • From: Adrien Destugues <pulkomandy@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 16 Feb 2016 07:06:51 +0100

On Tue, Feb 16, 2016 at 03:02:41AM +0100, François Revol wrote:

+{
+   if (url.IFindFirst("http://";) == 0 || url.IFindFirst("ftp://";) == 0
+           || url.IFindFirst("https://";) || url.IFindFirst("gopher://";) == 
0) {

Nice, although shouldn't it just check for [A-Za-z0-9+] before :// and
test for existing MIME with it instead of hardcoding the list?

It could use BUrl to do the parsing, actually. Not all URLs have a //
(it could be a mailto: URL for example)

-- 
Adrien.

Other related posts: