fix reddit mentions being ruined by owoify
parent
4780bb47b0
commit
005fc10e85
|
@ -17,6 +17,7 @@ OWO_EXCLUDE_PATTERNS = [
|
|||
sanitize_url_regex, # bare links
|
||||
mention_regex, # mentions
|
||||
group_mention_regex, #ping group mentions
|
||||
reddit_mention_regex, #/u/ and /r/
|
||||
command_regex, # markup commands
|
||||
]
|
||||
|
||||
|
|
|
@ -253,7 +253,7 @@ sanitize_url_regex = re.compile(
|
|||
###REDDIT
|
||||
|
||||
#sanitizing
|
||||
reddit_mention_regex = re.compile('([>\s])\/?(r|u)(\/[\w-]{2,25})' + NOT_IN_CODE_OR_LINKS, flags=re.I|re.A)
|
||||
reddit_mention_regex = re.compile('(^|[>\s])\/?(r|u)(\/[\w-]{2,25})' + NOT_IN_CODE_OR_LINKS, flags=re.I|re.A)
|
||||
reddit_domain_regex = re.compile("(^|\s|\()https?:\/\/(redd.it\/|((www\.|new\.)?reddit\.com|redd\.it)\/(u\/(?![\w-]{2,25}\/s\/)|user\/|(r\/\w{2,25}\/)?comments\/|r\/\w{2,25}\/?$))", flags=re.A)
|
||||
reddit_comment_link_regex = re.compile("https:\/\/old.reddit.com\/r\/\w{2,25}\/comments(\/\w+){3}\/?.*", flags=re.A)
|
||||
|
||||
|
|
Loading…
Reference in New Issue