diff --git a/files/helpers/get.py b/files/helpers/get.py index c75025eb2..b7eddef4c 100644 --- a/files/helpers/get.py +++ b/files/helpers/get.py @@ -347,7 +347,7 @@ def get_sub_by_name(sub:str, v:Optional[User]=None, graceful=False) -> Optional[ if not sub: if graceful: return None else: abort(404) - sub = sub.replace('/h/', '').strip().lower() + sub = sub.replace('/h/', '').replace('h/', '').strip().lower() if not sub: if graceful: return None else: abort(404) diff --git a/files/routes/reporting.py b/files/routes/reporting.py index da75e6f41..70d063792 100644 --- a/files/routes/reporting.py +++ b/files/routes/reporting.py @@ -145,7 +145,9 @@ def remove_report_comment(v, cid, uid): return {"message": "Report removed successfully!"} def move_post(post:Submission, v:User, reason:str) -> Union[bool, str]: - if not reason.startswith('/h/'): return False + if not reason.startswith('/h/') and not reason.startswith('h/'): + return False + sub_from = post.sub sub_to = get_sub_by_name(reason, graceful=True) sub_to = sub_to.name if sub_to else None