diff --git a/webapp_create_post.py b/webapp_create_post.py index c307e9323..449e27007 100644 --- a/webapp_create_post.py +++ b/webapp_create_post.py @@ -457,7 +457,8 @@ def html_new_post(edit_post_params: {}, bold_reading, dogwhistles, minimize_all_images, None, buy_sites, auto_cw_cache) - new_post_text += open_content_warning(replied_to_post) + new_post_text += \ + open_content_warning(replied_to_post, translate) # about the author if has_object_dict(post_json_object): if post_json_object['object'].get('attributedTo'): diff --git a/webapp_utils.py b/webapp_utils.py index 3f86e2c80..d41452f1a 100644 --- a/webapp_utils.py +++ b/webapp_utils.py @@ -285,10 +285,11 @@ def get_content_warning_button(post_id: str, translate: {}, '\n' -def open_content_warning(text: str) -> str: +def open_content_warning(text: str, translate: {}) -> str: """Opens content warning when replying to a post with a cw """ - return text.replace('
', '
').replace('
', '') + text = text.replace('
', '').replace('
', '') + return text.replace(translate['SHOW MORE'], '', 1) def _set_actor_property_url(actor_json: {},