Permalink
Browse files

Handle HTML links in a case independent manner

  • Loading branch information...
1 parent 927544b commit 243646d11052f278e90a81fb343ad78ace1cae65 @jberger jberger committed Apr 2, 2012
Showing with 3 additions and 3 deletions.
  1. +1 −1 lib/Alien/Base/ModuleBuild/Utils.pm
  2. +2 −2 t/http.t
@@ -37,7 +37,7 @@ sub extract_href {
$text =~ s/^$delim//;
$text =~ s/$delim$//;
return $text;
- } elsif ($tag =~ /href=(.*?)(?:\s|\n|>)/) {
+ } elsif ($tag =~ /href=(.*?)(?:\s|\n|>)/i) {
return $1;
} else {
return ();
View
@@ -8,8 +8,8 @@ use_ok('Alien::Base::ModuleBuild::Repository::HTTP');
my $repo = Alien::Base::ModuleBuild::Repository::HTTP->new;
# replicated in utils.t
-my $html = q#Some <a href=link>link text</a> stuff. And a little <A HREF="link2">different link text</a>. <!-- <a href="dont_follow.html">you can't see me!</a> -->#;
-my $correct = [qw/link link2/];
+my $html = q#Some <a href=link>link text</a> stuff. And a little <A HREF="link2">different link text</a>. AN ALL CAPS TAG <A HREF="link3">ALL CAPS</A> <A HREF=link4>ALL CAPS NO QUOTES</A>. <!-- <a href="dont_follow.html">you can't see me!</a> -->#;
+my $correct = [qw/link link2 link3 link4/];
SKIP: {
no warnings 'once';

0 comments on commit 243646d

Please sign in to comment.