mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -08:00
don't add paragraph tags around replies
This commit is contained in:
parent
dc6cd87a15
commit
51b79df591
1 changed files with 1 additions and 3 deletions
|
@ -1710,9 +1710,7 @@ def create_post_reply(activity_log: ActivityPubLog, community: Community, in_rep
|
||||||
ap_create_id=request_json['id'],
|
ap_create_id=request_json['id'],
|
||||||
ap_announce_id=announce_id,
|
ap_announce_id=announce_id,
|
||||||
instance_id=user.instance_id)
|
instance_id=user.instance_id)
|
||||||
if 'content' in request_json['object']: # Kbin, Mastodon, etc provide their posts as html
|
if 'content' in request_json['object']:
|
||||||
if not request_json['object']['content'].startswith('<p>') or not request_json['object']['content'].startswith('<blockquote>'):
|
|
||||||
request_json['object']['content'] = '<p>' + request_json['object']['content'] + '</p>'
|
|
||||||
post_reply.body_html = allowlist_html(request_json['object']['content'])
|
post_reply.body_html = allowlist_html(request_json['object']['content'])
|
||||||
if 'source' in request_json['object'] and isinstance(request_json['object']['source'], dict) and \
|
if 'source' in request_json['object'] and isinstance(request_json['object']['source'], dict) and \
|
||||||
'mediaType' in request_json['object']['source'] and request_json['object']['source']['mediaType'] == 'text/markdown':
|
'mediaType' in request_json['object']['source'] and request_json['object']['source']['mediaType'] == 'text/markdown':
|
||||||
|
|
Loading…
Add table
Reference in a new issue