Subtitles don't need <span> fields

This commit is contained in:
Yohann D'ANELLO 2020-02-10 18:16:19 +01:00
parent 5b2dd84115
commit 0548e34568
1 changed files with 4 additions and 0 deletions

View File

@ -121,6 +121,10 @@ class MediaAdminForm(ModelForm):
title_normalized.replace(' ', ''), )
if self.cleaned_data['subtitle']:
self.cleaned_data['subtitle'] = re.sub(r'</span>',
'', self.cleaned_data['subtitle'])
self.cleaned_data['subtitle'] = re.sub(r'<span.*>',
'', self.cleaned_data['subtitle'])
start = self.cleaned_data['subtitle'].split(' ')[0] \
.replace('.', '')