Skip to content

Commit 5107dcf

Browse files
committed
Fixed the multiple (incorrect) extension problem for some materials links. Fixes issue ietf-tools#1947.
- Legacy-Id: 11104
1 parent 0bb8c23 commit 5107dcf

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

ietf/doc/views_doc.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -549,8 +549,9 @@ def document_main(request, name, rev=None):
549549
extension = os.path.splitext(g)[1]
550550
t = os.path.splitext(g)[1].lstrip(".")
551551
url = doc.href()
552+
urlbase, urlext = os.path.splitext(url)
552553
if not url.endswith("/") and not url.endswith(extension):
553-
url += extension
554+
url = urlbase + extension
554555

555556
if extension == ".txt":
556557
content = get_document_content(basename, pathname + extension, split=False)

0 commit comments

Comments
 (0)