mirror of https://gitlab.com/bashrc2/epicyon
Remove any html from nickname and bio
parent
b7e8ad6e7a
commit
071604e07f
|
@ -171,6 +171,7 @@ from shares import getSharesFeedForPerson
|
||||||
from shares import addShare
|
from shares import addShare
|
||||||
from shares import removeShare
|
from shares import removeShare
|
||||||
from shares import expireShares
|
from shares import expireShares
|
||||||
|
from utils import removeHtml
|
||||||
from utils import setHashtagCategory
|
from utils import setHashtagCategory
|
||||||
from utils import isEditor
|
from utils import isEditor
|
||||||
from utils import getImageExtensions
|
from utils import getImageExtensions
|
||||||
|
@ -3760,7 +3761,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
# change displayed name
|
# change displayed name
|
||||||
if fields.get('displayNickname'):
|
if fields.get('displayNickname'):
|
||||||
if fields['displayNickname'] != actorJson['name']:
|
if fields['displayNickname'] != actorJson['name']:
|
||||||
actorJson['name'] = fields['displayNickname']
|
actorJson['name'] = \
|
||||||
|
removeHtml(fields['displayNickname'])
|
||||||
actorChanged = True
|
actorChanged = True
|
||||||
|
|
||||||
# change media instance status
|
# change media instance status
|
||||||
|
@ -4047,13 +4049,14 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
# change user bio
|
# change user bio
|
||||||
if fields.get('bio'):
|
if fields.get('bio'):
|
||||||
if fields['bio'] != actorJson['summary']:
|
if fields['bio'] != actorJson['summary']:
|
||||||
|
bioStr = removeHtml(fields['bio'])
|
||||||
actorTags = {}
|
actorTags = {}
|
||||||
actorJson['summary'] = \
|
actorJson['summary'] = \
|
||||||
addHtmlTags(baseDir,
|
addHtmlTags(baseDir,
|
||||||
httpPrefix,
|
httpPrefix,
|
||||||
nickname,
|
nickname,
|
||||||
domainFull,
|
domainFull,
|
||||||
fields['bio'], [], actorTags)
|
bioStr, [], actorTags)
|
||||||
if actorTags:
|
if actorTags:
|
||||||
actorJson['tag'] = []
|
actorJson['tag'] = []
|
||||||
for tagName, tag in actorTags.items():
|
for tagName, tag in actorTags.items():
|
||||||
|
|
Loading…
Reference in New Issue