Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/URI/Find.pm
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ my $mark = q(-_.!~*'());
my $unreserved = "A-Za-z0-9\Q$mark\E";
my $uric = quotemeta($reserved) . '\p{isAlpha}' . $unreserved . "%";

# URI scheme pattern without the non-alpha numerics.
# URI scheme pattern without the non-alpha numerics or when very long.
# Those are extremely uncommon and interfere with the match.
my($schemeRe) = qr/[a-zA-Z][a-zA-Z0-9\+]*/;
my($schemeRe) = qr/[a-zA-Z][a-zA-Z0-9\+]{0,16}/;
my($uricSet) = $uric; # use new set

# Some schemes which URI.pm does not explicitly support.
Expand Down
2 changes: 1 addition & 1 deletion lib/URI/Find/Schemeless.pm
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ sub schemeless_uri_re {
# false match of "Lite.pm" via "MIME/Lite.pm".
(?: ^ | (?<=[\s<>()\{\}\[\]]) )
# hostname
(?: [$dnsSet]+(?:\.[$dnsSet]+)*\.$tldRe
(?: [$dnsSet]{1,63}(?:\.[$dnsSet]{1,63}){0,126}\.$tldRe
| (?:\d{1,3}\.){3}\d{1,3} ) # not inet_aton() complete
(?:
(?=[\s\Q$cruftSet\E]) # followed by unrelated thing
Expand Down