keep twitter params for search

pull/124/head
Aevann 2023-02-17 20:27:41 +02:00
parent 844098ebfc
commit 7d926e56c9
2 changed files with 0 additions and 4 deletions

View File

@ -23,8 +23,6 @@ description_regex = re.compile("[^<>&\n\t]{1,300}", flags=re.A)
badge_name_regex = re.compile("[A-Za-z0-9 ]+", flags=re.A)
twitter_regex = re.compile("(https:\/\/twitter.com\/[A-Za-z0-9_/]+)\?[^\s)]*", flags=re.A)
valid_sub_regex = re.compile("^[a-zA-Z0-9_\-]{3,25}$", flags=re.A)
query_regex = re.compile("(\w+):(\S+)", flags=re.A)

View File

@ -367,8 +367,6 @@ def sanitize(sanitized, golden=True, limit_pings=0, showmore=True, count_marseys
sanitized = normalize_url(sanitized)
sanitized = twitter_regex.sub(r'\1', sanitized)
if '```' not in sanitized and '<pre>' not in sanitized:
sanitized = linefeeds_regex.sub(r'\1\n\n\2', sanitized)