fix: don't use rfc names in bibxml-id elements (#4823)

This commit is contained in:
Robert Sparks 2022-12-06 08:49:14 -06:00 committed by GitHub
parent ebcaa424c3
commit ded650286d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1198,5 +1198,9 @@ def bibxml_for_draft(doc, rev=None):
else:
doc.date = doc.time.astimezone(tzinfo).date() # Even if this may be incorrect, what would be better?
return render_to_string('doc/bibxml.xml', {'name':doc.name, 'doc': doc, 'doc_bibtype':'I-D'})
name = doc.name if isinstance(doc, Document) else doc.doc.name
if name.startswith('rfc'): # bibxml3 does not speak of RFCs
raise Http404()
return render_to_string('doc/bibxml.xml', {'name':name, 'doc':doc, 'doc_bibtype':'I-D'})