mirror of https://gitlab.com/bashrc2/epicyon
Remove any html from location string
parent
eca0fa1736
commit
b7f3afa014
|
@ -404,7 +404,7 @@ def _icalendar_day(base_dir: str, nickname: str, domain: str,
|
|||
event_description = evnt['name'].strip()
|
||||
elif evnt['type'] == 'Place':
|
||||
if evnt.get('name'):
|
||||
event_place = evnt['name']
|
||||
event_place = remove_html(evnt['name'])
|
||||
|
||||
print('icalendar: ' + str(post_id) + ' ' +
|
||||
str(event_start) + ' ' + str(event_description) + ' ' +
|
||||
|
|
3
maps.py
3
maps.py
|
@ -30,7 +30,8 @@ def get_location_from_tags(tags: []) -> str:
|
|||
continue
|
||||
if not isinstance(tag_item['name'], str):
|
||||
continue
|
||||
return tag_item['name'].replace('\n', ' ')
|
||||
location_str = tag_item['name'].replace('\n', ' ')
|
||||
return remove_html(location_str)
|
||||
return None
|
||||
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@ __module_group__ = "Calendar"
|
|||
import os
|
||||
from datetime import datetime
|
||||
from datetime import date
|
||||
from utils import remove_html
|
||||
from utils import get_display_name
|
||||
from utils import get_config_param
|
||||
from utils import get_nickname_from_actor
|
||||
|
@ -224,7 +225,7 @@ def _html_calendar_day(person_cache: {}, translate: {},
|
|||
event_description = evnt['name'].strip()
|
||||
elif evnt['type'] == 'Place':
|
||||
if evnt.get('name'):
|
||||
event_place = evnt['name']
|
||||
event_place = remove_html(evnt['name'])
|
||||
if '://' in event_place:
|
||||
bounding_box_degrees = 0.001
|
||||
event_map = \
|
||||
|
|
Loading…
Reference in New Issue