mirror of
https://github.com/sileht/bird-lg.git
synced 2024-12-22 20:44:43 +01:00
Add ipv6 link
This commit is contained in:
parent
7991945f5f
commit
d83d3e4777
1
lg.py
1
lg.py
|
@ -39,6 +39,7 @@ def add_links(text):
|
|||
line = re.sub(r'(\d+\.\d+\.\d+\.\d+)', r'<a href="/whois/\1" class="whois">\1</a>',line)
|
||||
hosts = "/".join(request.path.split("/")[2:])
|
||||
line = re.sub(r'\[(\w+)\s+((|\d\d\d\d-\d\d-\d\d\s)(|\d\d:)\d\d:\d\d|\w\w\w\d\d)', r'[<a href="/detail/%s?q=\1">\1</a> \2' % hosts, line)
|
||||
line = re.sub(r'(^|\s+)(([a-f\d]{0,4}:){2,10}[a-f\d]{0,4})', r'\1<a href="/whois/\2" class="whois">\2</a>',line , re.I)
|
||||
ret_text.append(line)
|
||||
return "\n".join(ret_text)
|
||||
|
||||
|
|
Loading…
Reference in a new issue