do not print http:// https:// news:// ftp://

This commit is contained in:
Yann Leboulanger 2005-03-10 09:58:12 +00:00
parent 7011d687a6
commit 9215059bc2
1 changed files with 15 additions and 1 deletions

View File

@ -664,13 +664,27 @@ class tabbed_chat_window:
text = word[1:-1]
else:
#it's an url
if word.startswith('http://'):
if word.startswith('ftp://'):
if len(word) > 6:
text = word[6:]
tag += '_url'
else:
text = word
tag = None
elif word.startswith('http://') or word.startswith('news://'):
if len(word) > 7:
text = word[7:]
tag += '_url'
else:
text = word
tag = None
elif word.startswith('https://'):
if len(word) > 8:
text = word[8:]
tag += '_url'
else:
text = word
tag = None
else:
tag += '_url'
text = word