diff --git a/r2/r2/lib/utils/utils.py b/r2/r2/lib/utils/utils.py index 83efa4f23..9893bb81e 100644 --- a/r2/r2/lib/utils/utils.py +++ b/r2/r2/lib/utils/utils.py @@ -305,7 +305,9 @@ def extract_title(data): to_trim = re.search(u'\s[\u00ab\u00bb\u2013\u2014|-]\s', reverse_title, flags=re.UNICODE) - if to_trim: + + # only trim if it won't take off over half the title + if to_trim and to_trim.end() < len(title) / 2: title = title[:-(to_trim.end())] return title.encode('utf-8').strip()