diff options
Diffstat (limited to 'tpl')
-rw-r--r-- | tpl/blog/atom_feed.php | 7 | ||||
-rw-r--r-- | tpl/blog/index.php | 6 |
2 files changed, 7 insertions, 6 deletions
diff --git a/tpl/blog/atom_feed.php b/tpl/blog/atom_feed.php index 20dc0ea..a4344ed 100644 --- a/tpl/blog/atom_feed.php +++ b/tpl/blog/atom_feed.php @@ -1,11 +1,12 @@ <?php +header("HTTP/1.1 200 OK"); header("Content-Type: application/xml"); echo '<?xml version="1.0" encoding="utf-8"?>'."\n"; echo '<feed xmlns="http://www.w3.org/2005/Atom">'."\n"; -echo '<title>' . $blog_title . '</title>'."\n"; +echo '<title>' . htmlspecialchars($blog_title) . '</title>'."\n"; echo '<id>' . $blog_base_url . "blog". "</id>\n"; -echo '<link href="' . $blog_base_url . "blog". '" rel="self" />' . "\n"; +echo '<link href="' . $blog_base_url . "index.php?p=" . $url . '" rel="self" />' . "\n"; function beginning($text, $len = 500) { @@ -18,7 +19,7 @@ function beginning($text, $len = 500) { foreach ($posts as $post) { echo "\n<entry>\n"; - echo '<title>' . $post['title'] . "</title>\n"; + echo '<title>' . htmlspecialchars($post['title']) . "</title>\n"; echo '<published>' . @date("c", $post['date_ts']) . "</published>\n"; echo '<id>' . $blog_base_url . "view-blog-" . $post['id'] . "</id>\n"; foreach (explode(', ', $post['tags']) as $tag) { diff --git a/tpl/blog/index.php b/tpl/blog/index.php index 6d07efa..c04b4c0 100644 --- a/tpl/blog/index.php +++ b/tpl/blog/index.php @@ -58,10 +58,10 @@ $ze[] = "feed-atom"; $zd = implode("-", $ze); echo '<ul>'; if (count($fvalues) > 0) { - echo '<li><a href="index-blog-' . $zd . '">Atom feed for this selection</a></li>'; - echo '<li><a href="index-blog-feed-atom">Homepage Atom feed</a></li>'; + echo '<li><a href="index.php?p=index-blog-' . $zd . '">Atom feed for this selection</a></li>'; + echo '<li><a href="index.php?p=index-blog-feed-atom">Homepage Atom feed</a></li>'; } else { - echo '<li><a href="index-blog-feed-atom">Atom feed</a></li>'; + echo '<li><a href="index.php?p=index-blog-feed-atom">Atom feed</a></li>'; } echo '</ul>'; |