fox II/IDEC networks :: ii.about.2014 :: / Re: тестирую новый txt-клиент | Login |
код
код2
for n in lst: print n
текст1текст2
текст3
def rend(txt): out = bottle.html_escape(txt) r1 = re.compile(r"(\b(http|https)://([-A-Za-z0-9+&@#/%?=~_()|!:,.;]*[-A-Za-z0-9+&@#/%=~_()|]))") out = r1.sub(r'<a href="\1">\1</a>',out) r2 = re.compile(r"(\b(ii)://([-A-Za-z0-9+&@#/%?=~_()|!:,.;]*[-A-Za-z0-9+&@#/%=~_()|]))") out = r2.sub(r'<a href="\3"><span class="success radius label">\3</span></a>',out) return out.replace('\n', '<br />')