diff --git a/files/helpers/const.py b/files/helpers/const.py index 427bd702ac..5d5aa40d6e 100644 --- a/files/helpers/const.py +++ b/files/helpers/const.py @@ -692,14 +692,14 @@ controversial_regex = re.compile('["> ](https:\/\/old\.reddit\.com/r/[a-zA-Z0-9_ fishylinks_regex = re.compile("https?://\S+", flags=re.A) -spoiler_regex = re.compile('''\|\|([^/'"]+)\|\|''', flags=re.A) +spoiler_regex = re.compile('''\|\|(.+)\|\|''', flags=re.A) video_regex = re.compile('
(https:\/\/[\w\-.#&/=\?@%+]{5,250}\.(mp4|webm|mov))<\/a><\/p>', flags=re.I|re.A)
unlinked_regex = re.compile('''(^|\s| )(https:\/\/[\w\-.#&/=\?@%+]{5,250})''', flags=re.A)
imgur_regex = re.compile('(https://i\.imgur\.com/([a-z0-9]+))\.(jpg|png|jpeg|webp)(?!)', flags=re.I|re.A)
reddit_regex = re.compile('(^|\s| )\/?((r|u)\/(\w|-){3,25})', flags=re.A)
sub_regex = re.compile('(^|\s| )\/?(h\/(\w|-){3,25})', flags=re.A)
youtube_regex = re.compile('" target="_blank">(https:\/\/youtube\.com\/watch\?v\=([a-z0-9-_]{5,20})[\w\-.#&/=\?@%+]*)