mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-04-05 03:00:15 -04:00
Revert "Validate subreddit name when submitting a link"
This reverts commit 0a31396f8a7aea504518ee326feef3f31d297f30.
This commit is contained in:
committed by
Max Goodman
parent
3a5d967553
commit
70a7f311ee
@@ -850,10 +850,6 @@ class VSubmitSR(Validator):
|
||||
self.set_error(errors.SUBREDDIT_REQUIRED)
|
||||
return None
|
||||
|
||||
if not chksrname(sr_name):
|
||||
self.set_error(errors.SUBREDDIT_NOEXIST)
|
||||
return None
|
||||
|
||||
try:
|
||||
sr = Subreddit._by_name(str(sr_name).strip())
|
||||
except (NotFound, AttributeError, UnicodeEncodeError):
|
||||
@@ -990,9 +986,6 @@ class VUrl(VRequired):
|
||||
def run(self, url, sr = None, resubmit=False):
|
||||
if sr is None and not isinstance(c.site, FakeSubreddit):
|
||||
sr = c.site
|
||||
elif not chksrname(sr):
|
||||
self.set_error(errors.SUBREDDIT_NOEXIST)
|
||||
sr = None
|
||||
elif sr:
|
||||
try:
|
||||
sr = Subreddit._by_name(str(sr))
|
||||
|
||||
Reference in New Issue
Block a user