forked from indymedia/epicyon
Avoid long profile descriptions
parent
0150f19cd9
commit
5ba9fa8ca5
|
@ -1260,6 +1260,10 @@ 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')
|
||||||
|
# keep the profile description short
|
||||||
|
if len(profileDescriptionShort)>256:
|
||||||
|
profileDescriptionShort=''
|
||||||
|
# remove formatting from profile description used on title
|
||||||
avatarDescription=''
|
avatarDescription=''
|
||||||
if profileJson.get('summary'):
|
if profileJson.get('summary'):
|
||||||
avatarDescription=profileJson['summary'].replace('<br>','\n').replace('<p>','').replace('</p>','')
|
avatarDescription=profileJson['summary'].replace('<br>','\n').replace('<p>','').replace('</p>','')
|
||||||
|
@ -3233,6 +3237,10 @@ 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=''
|
||||||
|
# keep the profile description short
|
||||||
|
if len(profileDescriptionShort)>256:
|
||||||
|
profileDescriptionShort=''
|
||||||
|
# remove formatting from profile description used on title
|
||||||
avatarDescription=''
|
avatarDescription=''
|
||||||
if profileJson.get('summary'):
|
if profileJson.get('summary'):
|
||||||
avatarDescription=profileJson['summary'].replace('<br>','\n').replace('<p>','').replace('</p>','')
|
avatarDescription=profileJson['summary'].replace('<br>','\n').replace('<p>','').replace('</p>','')
|
||||||
|
|
Loading…
Reference in New Issue