You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But because in this line the link from the loop gets overwritten, all the subsequent gets do nothing.
Changing the code back to this, fixes our problem.
for l in self.__atom_link or []:
link = xml_elem('link', entry, href=l['href'])
if l.get('rel'):
link.attrib['rel'] = l['rel']
if l.get('type'):
link.attrib['type'] = l['type']
if l.get('hreflang'):
link.attrib['hreflang'] = l['hreflang']
if l.get('title'):
link.attrib['title'] = l['title']
if l.get('length'):
link.attrib['length'] = l['length']
The text was updated successfully, but these errors were encountered:
claeyswo
changed the title
atom_link gets overwritten by xml_elem
Only href gets rendered for links
Jan 19, 2024
emepetres
added a commit
to emepetres/python-feedgen
that referenced
this issue
Feb 14, 2024
Recently ran into this issue as well, when using both FeedEntry.link and FeedEntry.enclosure in the same entry for embedding the link to my blog post and the cover image respectively caused the generated Atom XML string to fail W3C Atom 1.0 validation tests indicating that a single Atom entry cannot have two links with rel="alternate" simultaneously.
I've removed all images from my feed for the time being as a workaround, but would love to see it fixed so I may start including images again in my feed entries.
python-feedgen/feedgen/entry.py
Line 139 in 97260ab
Due to this commit 966fea4
This is our self.__atom_link object
But because in this line the link from the loop gets overwritten, all the subsequent gets do nothing.
Changing the code back to this, fixes our problem.
The text was updated successfully, but these errors were encountered: