diff --git a/lib/URI/Title/HTML.pm b/lib/URI/Title/HTML.pm index 74c74b4..576cc1a 100644 --- a/lib/URI/Title/HTML.pm +++ b/lib/URI/Title/HTML.pm @@ -60,7 +60,7 @@ sub title { $title = "paste - "; } elsif ($url =~ /twitter.com\/(.*?)\/status(es)?\/\d+/i) { - $special_case = '<p class="js-tweet-text tweet-text ">([^\<]+)'; + $special_case = '<p class="js-tweet-text tweet-text">([^\<]+)'; $title = "twitter - "; } elsif ($url =~ /independent\.co\.uk/i) { diff --git a/t/html.t b/t/html.t index 585f112..8293bc2 100644 --- a/t/html.t +++ b/t/html.t @@ -24,8 +24,8 @@ if ($s) { # "got title for jerakeen.org"); ok( - title('http://theregister.co.uk/content/6/34549.html') =~ /lack of technology may harm your prospects/, - "got register title"); + title('http://yro.slashdot.org/story/14/01/28/1731201/why-does-facebook-need-to-read-my-text-messages') =~ /Why Does Facebook Need To Read My Text Messages\? - Slashdot/, + "got slashdot title"); ok( title('http://twitter.com/al3x/status/1039647490') eq 'twitter - Arianna Huffington: not a good saleswoman for blogging.',