Re: hyperlink handler for IP addresses

Trent Mick <[email protected]> Thu, 17 Mar 2011 12:29:37 -0700
Newsgroups gmane.comp.ide.komodo.general
Message-ID <[email protected]>
Actually now that I think about it... it should perhaps be rolled into
a better URLHandler. Matching the following:

http://example.com
http://example.com/foo.html
example.com/foo.html
http://10.0.0.1
http://10.0.0.1/foo.html
10.0.0.1
10.0.0.1/foo.html

Even:

example.com    (hardcoding a few of the common TLDs)

And then with query params, basic auth username/password, and anchors
on all of the above. :)


A couple separate requests of the URL hyperlinking:
- Currently it urlencodes '+'. It would be nice if it did NOT do that
given that browsers are fine with the '+'. E.g.:
    https://hub.joyent.com/wiki/display/support/Foo+Bar+Wiki+Page
- Currently the URL regex doesn't allow parens, e.g.:
    http://en.wikipedia.org/wiki/John_North_(historian)

Cheers,
Trent


On Wed, Mar 16, 2011 at 9:47 AM, Todd Whiteman <[email protected]> wrote:
> Thanks Trent, added it to trunk:
> http://svn.openkomodo.com/openkomodo/revision?rev=7402
>
> On 11-03-04 12:11 PM, Trent Mick wrote:
>>
>> var ipAddressHandler = new ko.hyperlinks.RegexHandler(
>>       "IP address",
>>       new RegExp("(\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3})"),
>>       ko.browse.openUrlInDefaultBrowser,
>>       "http://$1",
>>       null,
>>       Components.interfaces.ISciMoz.INDIC_PLAIN,
>>       RGB(0x60,0x90,0xff));
>



-- 
Trent Mick
_______________________________________________
Komodo-discuss mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Other options: http://listserv.ActiveState.com/mailman/listinfo/Komodo-discuss