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()
|
event_description = evnt['name'].strip()
|
||||||
elif evnt['type'] == 'Place':
|
elif evnt['type'] == 'Place':
|
||||||
if evnt.get('name'):
|
if evnt.get('name'):
|
||||||
event_place = evnt['name']
|
event_place = remove_html(evnt['name'])
|
||||||
|
|
||||||
print('icalendar: ' + str(post_id) + ' ' +
|
print('icalendar: ' + str(post_id) + ' ' +
|
||||||
str(event_start) + ' ' + str(event_description) + ' ' +
|
str(event_start) + ' ' + str(event_description) + ' ' +
|
||||||
|
|
3
maps.py
3
maps.py
|
@ -30,7 +30,8 @@ def get_location_from_tags(tags: []) -> str:
|
||||||
continue
|
continue
|
||||||
if not isinstance(tag_item['name'], str):
|
if not isinstance(tag_item['name'], str):
|
||||||
continue
|
continue
|
||||||
return tag_item['name'].replace('\n', ' ')
|
location_str = tag_item['name'].replace('\n', ' ')
|
||||||
|
return remove_html(location_str)
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,7 @@ __module_group__ = "Calendar"
|
||||||
import os
|
import os
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from datetime import date
|
from datetime import date
|
||||||
|
from utils import remove_html
|
||||||
from utils import get_display_name
|
from utils import get_display_name
|
||||||
from utils import get_config_param
|
from utils import get_config_param
|
||||||
from utils import get_nickname_from_actor
|
from utils import get_nickname_from_actor
|
||||||
|
@ -224,7 +225,7 @@ def _html_calendar_day(person_cache: {}, translate: {},
|
||||||
event_description = evnt['name'].strip()
|
event_description = evnt['name'].strip()
|
||||||
elif evnt['type'] == 'Place':
|
elif evnt['type'] == 'Place':
|
||||||
if evnt.get('name'):
|
if evnt.get('name'):
|
||||||
event_place = evnt['name']
|
event_place = remove_html(evnt['name'])
|
||||||
if '://' in event_place:
|
if '://' in event_place:
|
||||||
bounding_box_degrees = 0.001
|
bounding_box_degrees = 0.001
|
||||||
event_map = \
|
event_map = \
|
||||||
|
|
Loading…
Reference in New Issue