File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77from django .shortcuts import render
88from django .conf import settings
99from django .http import HttpResponse
10+ from django .utils .html import escape
1011
1112import changelog
13+ import debug # pyflakes:ignore
1214
1315# workaround for thread import lock problem, http://bugs.python.org/issue7980
1416import time
@@ -18,7 +20,7 @@ def trac_links(text):
1820 # changeset links
1921 text = re .sub (r'\[(\d+)\]' , r'<a href="https://wiki.tools.ietf.org/tools/ietfdb/changeset/\1">[\1]</a>' , text )
2022 # issue links
21- text = re .sub (r'#(\d+)' , r'<a href="https://wiki.tools.ietf.org/tools/ietfdb/ticket/\1 ">#\1 </a>' , text )
23+ text = re .sub (r'([^&]) #(\d+)' , r'\1 <a href="https://wiki.tools.ietf.org/tools/ietfdb/ticket/\2 ">#\2 </a>' , text )
2224 return text
2325
2426
@@ -37,7 +39,7 @@ def release(request, version=None):
3739 entries = dict ((entry .version , entry ) for entry in log_entries )
3840 if version == None or version not in entries :
3941 version = log_entries [0 ].version
40- entries [version ].logentry = trac_links (entries [version ].logentry .strip ('\n ' ))
42+ entries [version ].logentry = trac_links (escape ( entries [version ].logentry .strip ('\n ' ) ))
4143
4244 code_coverage_url = None
4345 code_coverage_time = None
You can’t perform that action at this time.
0 commit comments