Only recognize common url schemes in notification messages

Before the fix, the message tray highlighted all urls containing "://", even
invalid ones. This change fixes this by have the message tray highlight only
the urls with http, https, ftp schemes.

Credit goes to: Phuong Vu, Liye Fu, Monica Chelliah, Owen Taylor

https://bugzilla.gnome.org/show_bug.cgi?id=661225
This commit is contained in:
Monica Chelliah 2013-04-14 16:15:04 -04:00 committed by Owen W. Taylor
parent 9ae2440ec1
commit 608818fa9f

View File

@ -18,7 +18,7 @@ const _urlRegexp = new RegExp(
'(^|' + _leadingJunk + ')' +
'(' +
'(?:' +
'[a-z][\\w-]+://' + // scheme://
'(?:http|https|ftp)://' + // scheme://
'|' +
'www\\d{0,3}[.]' + // www.
'|' +