mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-29 08:48:18 -05:00
Redirect to subreddit search if subreddit name includes a hyphen
This commit is contained in:
@@ -342,7 +342,7 @@ def set_subreddit():
|
||||
elif '-' in sr_name:
|
||||
sr_names = sr_name.split('-')
|
||||
if not sr_names[0].lower() == All.name.lower():
|
||||
abort(404)
|
||||
redirect_to("/reddits/search?q=%s" % sr_name)
|
||||
srs = Subreddit._by_name(sr_names[1:], stale=can_stale).values()
|
||||
srs = [sr for sr in srs if not isinstance(sr, FakeSubreddit)]
|
||||
if not srs:
|
||||
|
||||
Reference in New Issue
Block a user