Default feed.id to feed.link (if present)
This commit is contained in:
parent
a2be5b6c2a
commit
fc6e39a388
@ -151,7 +151,7 @@ def source(xsource, source, bozo):
|
||||
""" copy source information to the entry """
|
||||
xdoc = xsource.ownerDocument
|
||||
|
||||
createTextElement(xsource, 'id', source.get('id', None))
|
||||
createTextElement(xsource, 'id', source.get('id', source.get('link',None)))
|
||||
createTextElement(xsource, 'icon', source.get('icon', None))
|
||||
createTextElement(xsource, 'logo', source.get('logo', None))
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
<!--
|
||||
Description: link relationship
|
||||
Expect: links[0].rel == 'alternate'
|
||||
Expect: links[0].rel == 'alternate' and id == 'http://example.com/1'
|
||||
-->
|
||||
|
||||
<feed xmlns="http://www.w3.org/2005/Atom">
|
||||
|
@ -1,10 +1,11 @@
|
||||
<!--
|
||||
Description: source link
|
||||
Expect: source.links[0].href == 'http://example.com/atom.xml'
|
||||
Expect: source.links[0].href == 'http://example.com/atom.xml' and source.id == 'http://example.com/'
|
||||
-->
|
||||
|
||||
<feed xmlns="http://www.w3.org/2005/Atom">
|
||||
<link rel='self' href='http://example.com/atom.xml'/>
|
||||
<link href='http://example.com/'/>
|
||||
<entry/>
|
||||
</feed>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user