Automatic link detection
This commit is contained in:
parent
8b9ce75959
commit
0b42dd7d52
2 changed files with 7 additions and 2 deletions
|
@ -31,7 +31,12 @@ class Event:
|
|||
|
||||
@property
|
||||
def description(self):
|
||||
return self._description
|
||||
if self._description is None: return None
|
||||
return re.sub(
|
||||
r'(https?://\S+)',
|
||||
r'<a href="\1">\1</a>',
|
||||
self._description,
|
||||
)
|
||||
|
||||
@property
|
||||
def location(self):
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
<div class="info">
|
||||
<div class="description">
|
||||
{% if event.description %}
|
||||
{{ event.description }}
|
||||
{{ event.description | safe }}
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="other">
|
||||
|
|
Reference in a new issue