From ded650286d2cbfb70c113e72d371eca9890aa525 Mon Sep 17 00:00:00 2001 From: Robert Sparks Date: Tue, 6 Dec 2022 08:49:14 -0600 Subject: [PATCH] fix: don't use rfc names in bibxml-id elements (#4823) --- ietf/doc/utils.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ietf/doc/utils.py b/ietf/doc/utils.py index 1824123ca..20e112037 100644 --- a/ietf/doc/utils.py +++ b/ietf/doc/utils.py @@ -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'})