From 18a803073326a6a8bd6af96dca70c2fe920c5994 Mon Sep 17 00:00:00 2001 From: Lazarus Long Date: Mon, 6 Mar 2017 14:37:24 +0000 Subject: [PATCH] Fixes URI first character matching. Github #17 --- Changes | 3 +++ lib/URI/Find.pm | 2 +- t/filter.t | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Changes b/Changes index 4a066ef..9039389 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,6 @@ + Bug Fixes + * URI first character matching [github 17] (lazarus) + 20160806 Sat Aug 6 13:36:14 PDT 2016 Distribution * Homepage is now metacpan diff --git a/lib/URI/Find.pm b/lib/URI/Find.pm index ad2ec75..6762989 100644 --- a/lib/URI/Find.pm +++ b/lib/URI/Find.pm @@ -33,7 +33,7 @@ my $extraSchemesRe = qr{^(?:git|svn|ssh|svn\+ssh)$}; # We need to avoid picking up 'HTTP::Request::Common' so we have a # subset of uric without a colon ("I have no colon and yet I must poop") my($uricCheat) = __PACKAGE__->uric_set; -$uricCheat =~ tr/://d; +$uricCheat =~ s{ \\ \: }{}mx; # Issue #17 # Identifying characters accidentally picked up with a URI. my($cruftSet) = q{])\},.'";}; #'# diff --git a/t/filter.t b/t/filter.t index b1dbbc2..dbf2b06 100644 --- a/t/filter.t +++ b/t/filter.t @@ -30,6 +30,7 @@ my @tasks = ( # Non-URL nested inside brackets [q{}, q{}], + [q{ http:\/example.com }, q{ http:\/example.com }], ); for my $task (@tasks) {