Check that actor summary exists

main
Bob Mottram 2024-05-15 17:21:18 +01:00
parent 4d38cce27b
commit 403c3a288d
2 changed files with 7 additions and 3 deletions

View File

@ -841,6 +841,8 @@ def html_header_with_person_markup(css_filename: str, instance_title: str,
first_entry = False
skills_markup += '\n ],\n'
description = ''
if actor_json.get('summary'):
description = remove_html(actor_json['summary'])
name_str = remove_html(actor_json['name'])
domain_full = actor_json['id'].split('://')[1].split('/')[0]

View File

@ -112,6 +112,8 @@ def html_welcome_profile(base_dir: str, nickname: str, domain: str,
edit_text_field(translate['Nickname'], 'displayNickname',
display_nickname)
bio_str = ''
if actor_json.get('summary'):
bio_str = \
actor_json['summary'].replace('<p>', '').replace('</p>', '')
if not bio_str: