forked from indymedia/epicyon
Replace formatting in profile description
parent
f2a5c16311
commit
0150f19cd9
|
@ -1260,10 +1260,13 @@ def htmlProfile(translate: {},projectVersion: str, \
|
||||||
if len(profileDescription.split('<br>'))>2:
|
if len(profileDescription.split('<br>'))>2:
|
||||||
profileDescriptionShort=''
|
profileDescriptionShort=''
|
||||||
profileDescription=profileDescription.replace('<br>','\n')
|
profileDescription=profileDescription.replace('<br>','\n')
|
||||||
|
avatarDescription=''
|
||||||
|
if profileJson.get('summary'):
|
||||||
|
avatarDescription=profileJson['summary'].replace('<br>','\n').replace('<p>','').replace('</p>','')
|
||||||
profileHeaderStr= \
|
profileHeaderStr= \
|
||||||
'<div class="hero-image">' \
|
'<div class="hero-image">' \
|
||||||
' <div class="hero-text">'+ \
|
' <div class="hero-text">'+ \
|
||||||
' <img loading="lazy" src="'+profileJson['icon']['url']+'" title="'+profileDescription+'" alt="'+profileDescription+'" class="title">' \
|
' <img loading="lazy" src="'+profileJson['icon']['url']+'" title="'+avatarDescription+'" alt="'+avatarDescription+'" class="title">' \
|
||||||
' <h1>'+displayName+'</h1>' \
|
' <h1>'+displayName+'</h1>' \
|
||||||
' <p><b>@'+nickname+'@'+domainFull+'</b></p>' \
|
' <p><b>@'+nickname+'@'+domainFull+'</b></p>' \
|
||||||
' <p>'+profileDescriptionShort+'</p>'+ \
|
' <p>'+profileDescriptionShort+'</p>'+ \
|
||||||
|
@ -3230,11 +3233,13 @@ def htmlProfileAfterSearch(translate: {}, \
|
||||||
if '<br>' in profileDescription:
|
if '<br>' in profileDescription:
|
||||||
if len(profileDescription.split('<br>'))>2:
|
if len(profileDescription.split('<br>'))>2:
|
||||||
profileDescriptionShort=''
|
profileDescriptionShort=''
|
||||||
profileDescription=profileDescription.replace('<br>','\n')
|
avatarDescription=''
|
||||||
|
if profileJson.get('summary'):
|
||||||
|
avatarDescription=profileJson['summary'].replace('<br>','\n').replace('<p>','').replace('</p>','')
|
||||||
profileStr= \
|
profileStr= \
|
||||||
' <div class="hero-image">' \
|
' <div class="hero-image">' \
|
||||||
' <div class="hero-text">' \
|
' <div class="hero-text">' \
|
||||||
' <img loading="lazy" src="'+avatarUrl+'" alt="'+profileDescription+'" title="'+profileDescription+'">' \
|
' <img loading="lazy" src="'+avatarUrl+'" alt="'+avatarDescription+'" title="'+avatarDescription+'">' \
|
||||||
' <h1>'+displayName+'</h1>' \
|
' <h1>'+displayName+'</h1>' \
|
||||||
' <p><b>@'+searchNickname+'@'+searchDomainFull+'</b></p>' \
|
' <p><b>@'+searchNickname+'@'+searchDomainFull+'</b></p>' \
|
||||||
' <p>'+profileDescriptionShort+'</p>'+ \
|
' <p>'+profileDescriptionShort+'</p>'+ \
|
||||||
|
|
Loading…
Reference in New Issue