Permalink
Browse files

better content matching

  • Loading branch information...
1 parent 61466bc commit cf8fb96cf8f948eb798faa992e7d8b89919aa601 @remy remy committed Aug 18, 2011
Showing with 2 additions and 1 deletion.
  1. +2 −1 list-home-code.php
View
@@ -194,7 +194,8 @@ function getRelativeTime($date) {
foreach ($bins[$key] as $bin) {
$url = formatURL($bin['url'], $bin['revision']);
preg_match('/<title>(.*?)<\/title>/', $bin['html'], $match);
- preg_match('/<body>(.*)/s', $bin['html'], $body);
+ preg_match('/<body.*?>(.*)/s', $bin['html'], $body);
+ $title = '';
if (count($body)) {
$title = $body[1];
if (get_magic_quotes_gpc() && $body[1]) {

0 comments on commit cf8fb96

Please sign in to comment.