use censored title in post url

pull/139/head
Aevann 2023-03-12 12:19:10 +02:00
parent f79733a36f
commit eb2659aac8
1 changed files with 2 additions and 1 deletions

View File

@ -117,7 +117,8 @@ class Submission(Base):
if self.sub and self.sub in {'chudrama', 'countryclub', 'masterbaiters'}:
output = '-'
else:
output = title_regex.sub('', self.title.lower())
title = self.plaintitle(None).lower()
output = title_regex.sub('', title)
output = output.split()[:6]
output = '-'.join(output)
if not output: output = '-'