diff --git a/content.py b/content.py index 735281d38..ff1535495 100644 --- a/content.py +++ b/content.py @@ -684,7 +684,8 @@ def _add_hash_tags(word_str: str, http_prefix: str, domain: str, 'type': 'Hashtag' } replace_hashtags[word_str] = "#" + \ + "\" class=\"mention hashtag\" rel=\"tag\" tabindex=\"10\">" + \ + "#" + \ hashtag + "" return True diff --git a/daemon.py b/daemon.py index b0c8a0b30..03e233ca2 100644 --- a/daemon.py +++ b/daemon.py @@ -19133,13 +19133,17 @@ class PubServer(BaseHTTPRequestHandler): not fields.get('pinToProfile'): print('WARN: no message, image description or pin') return -1 - submit_text = self.server.translate['Publish'] + submit_text1 = self.server.translate['Publish'] + submit_text2 = self.server.translate['Send'] + submit_text3 = submit_text2 custom_submit_text = \ get_config_param(self.server.base_dir, 'customSubmitText') if custom_submit_text: - submit_text = custom_submit_text + submit_text3 = custom_submit_text if fields.get('submitPost'): - if fields['submitPost'] != submit_text: + if fields['submitPost'] != submit_text1 and \ + fields['submitPost'] != submit_text2 and \ + fields['submitPost'] != submit_text3: print('WARN: no submit field ' + fields['submitPost']) return -1 else: diff --git a/utils.py b/utils.py index 6f77922aa..93f953fc6 100644 --- a/utils.py +++ b/utils.py @@ -3942,3 +3942,12 @@ def remove_square_capitals(text: str, system_language: str) -> str: else: result += chr(offset + text_value - start_value) return result + + +def dont_speak_hashtags(content: str) -> str: + """Ensure that hashtags aren't announced by screen readers + """ + if not content: + return content + return content.replace('>#