XF2: Allow extra / before threads in story URL.

This commit is contained in:
Jim Miller 2025-05-05 12:59:38 -05:00
parent e1d0bed52d
commit 47fd71c4b9

View file

@ -91,7 +91,7 @@ class BaseXenForo2ForumAdapter(BaseSiteAdapter):
def getSiteURLPattern(self):
## need to accept http and https still.
return re.escape(self.getURLPrefix()).replace("https","https?")+r"(?P<tp>threads|posts)/(?P<title>.+\.)?(?P<id>\d+)/?[^#]*?(#?post-(?P<anchorpost>\d+))?$"
return re.escape(self.getURLPrefix()).replace("https","https?")+r"/?(?P<tp>threads|posts)/(?P<title>.+\.)?(?P<id>\d+)/?[^#]*?(#?post-(?P<anchorpost>\d+))?$"
## For adapters, especially base_xenforoforum to override. Make
## sure to return unchanged URL if it's NOT a chapter URL. This