From 761d59cf010bb554d6a8057731de99b03f44715e Mon Sep 17 00:00:00 2001 From: Pascal Chevrel Date: Sat, 5 May 2012 20:04:37 +0200 Subject: [PATCH 1/3] remove xmlns on tags in atom feeds, this is already defined on the root element and is causing validation errors --- custom/views/atom10/index.tpl.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom/views/atom10/index.tpl.php b/custom/views/atom10/index.tpl.php index 74fda9f..b2ecbaf 100644 --- a/custom/views/atom10/index.tpl.php +++ b/custom/views/atom10/index.tpl.php @@ -15,7 +15,7 @@ - + <?php echo htmlspecialchars($item->get_feed()->getName()); ?> : <?php echo htmlspecialchars($item->get_title());?> get_permalink());?> From a34d1438e2d21abb13e41a731aff3edf5078d13d Mon Sep 17 00:00:00 2001 From: Pascal Chevrel Date: Sat, 5 May 2012 20:07:55 +0200 Subject: [PATCH 2/3] add an element to atom feed using the same value as , this is required for validation and for compatibility with feed agregators that may check for the field --- custom/views/atom10/index.tpl.php | 1 + 1 file changed, 1 insertion(+) diff --git a/custom/views/atom10/index.tpl.php b/custom/views/atom10/index.tpl.php index b2ecbaf..23f3163 100644 --- a/custom/views/atom10/index.tpl.php +++ b/custom/views/atom10/index.tpl.php @@ -20,6 +20,7 @@ get_permalink());?> get_date('Y-m-d\\TH:i:s+00:00'); ?> + get_date('Y-m-d\\TH:i:s+00:00'); ?> get_author()? $item->get_author()->get_name() : 'anonymous'); ?> get_content();?>]]> From 107fd72f0e3bdf3eaed33c5239c40d9aeb34b31b Mon Sep 17 00:00:00 2001 From: Pascal Chevrel Date: Sat, 5 May 2012 20:18:45 +0200 Subject: [PATCH 3/3] Don't send an empty element in the feed, just reuse the same data as in , use htmlspecialchars instead of htmlentities --- custom/views/atom10/index.tpl.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom/views/atom10/index.tpl.php b/custom/views/atom10/index.tpl.php index 23f3163..9249d22 100644 --- a/custom/views/atom10/index.tpl.php +++ b/custom/views/atom10/index.tpl.php @@ -5,8 +5,8 @@ header('Content-Type: application/atom+xml; charset=UTF-8'); echo '<?xml version="1.0" encoding="UTF-8" ?>'; ?><feed xmlns="http://www.w3.org/2005/Atom"> - <title><?php echo htmlentities($PlanetConfig->getName()); ?> - + <?php echo htmlspecialchars($PlanetConfig->getName()); ?> + getName()); ?> getUrl(); ?>