summaryrefslogtreecommitdiff
path: root/django/utils
diff options
context:
space:
mode:
Diffstat (limited to 'django/utils')
-rw-r--r--django/utils/feedgenerator.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/django/utils/feedgenerator.py b/django/utils/feedgenerator.py
index 24b2d1d172..50ede4dd21 100644
--- a/django/utils/feedgenerator.py
+++ b/django/utils/feedgenerator.py
@@ -187,7 +187,7 @@ class RssFeed(SyndicationFeed):
content_type = 'application/rss+xml; charset=utf-8'
def write(self, outfile, encoding):
- handler = SimplerXMLGenerator(outfile, encoding)
+ handler = SimplerXMLGenerator(outfile, encoding, short_empty_elements=True)
handler.startDocument()
handler.startElement("rss", self.rss_attributes())
handler.startElement("channel", self.root_attributes())
@@ -296,7 +296,7 @@ class Atom1Feed(SyndicationFeed):
ns = "http://www.w3.org/2005/Atom"
def write(self, outfile, encoding):
- handler = SimplerXMLGenerator(outfile, encoding)
+ handler = SimplerXMLGenerator(outfile, encoding, short_empty_elements=True)
handler.startDocument()
handler.startElement('feed', self.root_attributes())
self.add_root_elements(handler)