diff --git a/rss/rss.php b/rss/rss.php index ae67ea4..829de5d 100644 --- a/rss/rss.php +++ b/rss/rss.php @@ -26,7 +26,7 @@ function Excerpt($excerpt) return $excerpt; } -function datesort($a , $b) +function datesort($a, $b) { if ($a->udate == $b->udate) { @@ -38,7 +38,7 @@ function datesort($a , $b) function utfentities($string) { - return htmlentities($string, ENT_COMPAT, 'UTF-8'); + return htmlentities($string, ENT_COMPAT | ENT_XML1); } function _query($s, $byid = false) @@ -110,10 +110,10 @@ if ($type == 'strips' or $type == '') foreach($s as $k => $v) { $s[$k]->link = SITE_HOST . SITE_PATH . "/strip/$v->id"; - $s[$k]->title = "Comic [$v->id] \"" . numeric_entities(utfentities($v->title)) . '"'; + $s[$k]->title = "Comic [$v->id] \"" . utfentities($v->title) . '"'; $s[$k]->desc = "chapdesc comic $v->id -
[read...] -
[link . "\">permalink] +
[read...] +
[link . "\">permalink] ]]>"; $s[$k]->date = date(DATE_RSS, $v->udate); $s[$k]->guid = $s[$k]->link; @@ -130,7 +130,7 @@ if ($type == 'rants' or $type == '') $rant_query = 'SELECT r.id, r.body, UNIX_TIMESTAMP(r.published) as udate, c.name, r.title FROM rant r JOIN contributor c ON r.author = c.id WHERE r.published <= NOW() AND r.status = "published" - ORDER BY udate DESC LIMIT 5'; + ORDER BY r.published DESC LIMIT 5'; $s = _query($rant_query) or die(mysqli_error($link)); @@ -173,7 +173,7 @@ usort($f_items, 'datesort'); $f_date = $f_items[0]->date; -$rfc1123_date = gmdate('D, d M Y H:i:s', $f_items[0]->udate) . ' GMT'; +$rfc1123_date = gmdate(DATE_RFC1123, $f_items[0]->udate); $etag = md5($rfc1123_date); /* Conditional Get */ @@ -202,7 +202,7 @@ echo '', "\n"; <?php echo $f_title; ?> https://megatokyo.com - en-us + en-US Fred Gallagher piro@megatokyo.com (Fred Gallagher) http://cyber.harvard.edu/rss/rss.html @@ -210,7 +210,7 @@ echo '', "\n"; 15 - 0) foreach ($f_items as $v) { ?> + <?php echo $v->title; ?> link; ?>