Skip to content

Commit d868594

Browse files
committed
Now /doc/std1/ works, we can actually do a local link in
urlize_ietf_docs rather than linking to the tools.ietf.org server - Legacy-Id: 5297
1 parent 7998371 commit d868594

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

ietf/idtracker/templatetags/ietf_filters.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -221,14 +221,12 @@ def urlize_ietf_docs(string, autoescape=None):
221221
"""
222222
if autoescape and not isinstance(string, SafeData):
223223
string = escape(string)
224-
print string
225224
string = re.sub("(?<!>)(RFC ?)0{0,3}(\d+)", "<a href=\"/doc/rfc\\2/\">\\1\\2</a>", string)
226-
string = re.sub("(?<!>)(BCP ?)0{0,3}(\d+)", "<a href=\"http://tools.ietf.org/html/bcp\\2/\">\\1\\2</a>", string)
227-
string = re.sub("(?<!>)(STD ?)0{0,3}(\d+)", "<a href=\"http://tools.ietf.org/html/std\\2/\">\\1\\2</a>", string)
228-
string = re.sub("(?<!>)(FYI ?)0{0,3}(\d+)", "<a href=\"http://tools.ietf.org/html/fyi\\2/\">\\1\\2</a>", string)
225+
string = re.sub("(?<!>)(BCP ?)0{0,3}(\d+)", "<a href=\"/doc/bcp\\2/\">\\1\\2</a>", string)
226+
string = re.sub("(?<!>)(STD ?)0{0,3}(\d+)", "<a href=\"/doc/std\\2/\">\\1\\2</a>", string)
227+
string = re.sub("(?<!>)(FYI ?)0{0,3}(\d+)", "<a href=\"/doc/fyi\\2/\">\\1\\2</a>", string)
229228
string = re.sub("(?<!>)(draft-[-0-9a-zA-Z._+]+)", "<a href=\"/doc/\\1/\">\\1</a>", string)
230229
string = re.sub("(?<!>)(conflict-review-[-0-9a-zA-Z._+]+)", "<a href=\"/doc/\\1/\">\\1</a>", string)
231-
print string
232230
return mark_safe(string)
233231
urlize_ietf_docs.is_safe = True
234232
urlize_ietf_docs.needs_autoescape = True

0 commit comments

Comments
 (0)