Show More
@@ -659,3 +659,15 b' def fancy_file_stats(stats):' | |||||
659 | d_d = '<div class="deleted %s" style="width:%s%%">%s</div>' % (cgen('d'), |
|
659 | d_d = '<div class="deleted %s" style="width:%s%%">%s</div>' % (cgen('d'), | |
660 | d_p, d_v) |
|
660 | d_p, d_v) | |
661 | return literal('<div style="width:%spx">%s%s</div>' % (width, d_a, d_d)) |
|
661 | return literal('<div style="width:%spx">%s%s</div>' % (width, d_a, d_d)) | |
|
662 | ||||
|
663 | ||||
|
664 | def urlify_text(text): | |||
|
665 | import re | |||
|
666 | ||||
|
667 | url_pat = re.compile(r'(http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+)') | |||
|
668 | ||||
|
669 | def url_func(match_obj): | |||
|
670 | url_full = match_obj.groups()[0] | |||
|
671 | return '<a href="%(url)s">%(url)s</a>' % ({'url':url_full}) | |||
|
672 | ||||
|
673 | return literal(url_pat.sub(url_func, text)) |
@@ -91,7 +91,7 b'' | |||||
91 | <div class="label"> |
|
91 | <div class="label"> | |
92 | <label>${_('Description')}:</label> |
|
92 | <label>${_('Description')}:</label> | |
93 | </div> |
|
93 | </div> | |
94 | <div class="input-short desc">${c.dbrepo.description}</div> |
|
94 | <div class="input-short desc">${h.urlify_text(c.dbrepo.description)}</div> | |
95 | </div> |
|
95 | </div> | |
96 |
|
96 | |||
97 |
|
97 |
General Comments 0
You need to be logged in to leave comments.
Login now