Opened 4 years ago

Closed 4 years ago

#32789 closed Cleanup/optimization (fixed)

adding support for self closing tags in syndication feeds

Reported by: Mohammadreza Varasteh Owned by: Mohammadreza Varasteh
Component: contrib.syndication Version: 3.2
Severity: Normal Keywords: feeds; syndication
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

the code for syndication feeds was written in a time where self closing tags didn't exist. but today, if an element has no text between the tags, the standard is that it should be a self closing tag. python added this functionality in 3.2 to XMLGenerator but django still doesn't use this in generating syndication feeds. this is the matter of passing a single argument to the SimplerXMLGenerator that django uses for generating feeds. since SimplerXMLGenerator directly inherits from pythons XMLGenrator, passing the arguments works with this class too .
this is my attempt at making it right
https://github.com/django/django/pull/14451

Change History (6)

comment:1 by Mohammadreza Varasteh, 4 years ago

Owner: changed from nobody to Mohammadreza Varasteh
Status: newassigned

comment:2 by Mohammadreza Varasteh, 4 years ago

Triage Stage: UnreviewedAccepted

comment:3 by Mariusz Felisiak, 4 years ago

Triage Stage: AcceptedUnreviewed

The-Daishogun, you shouldn't accept your own tickets.

comment:4 by Mariusz Felisiak, 4 years ago

Needs documentation: set
Needs tests: set
Triage Stage: UnreviewedAccepted
Type: New featureCleanup/optimization

comment:5 by Mariusz Felisiak, 4 years ago

Component: Utilitiescontrib.syndication
Needs documentation: unset
Needs tests: unset
Triage Stage: AcceptedReady for checkin

comment:6 by Mariusz Felisiak <felisiak.mariusz@…>, 4 years ago

Resolution: fixed
Status: assignedclosed

In e93eb3d9:

Fixed #32789 -- Made feeds emit elements with no content as self-closing tags.

Note: See TracTickets for help on using tickets.
Back to Top