1
0
mirror of https://gitlab.crans.org/mediatek/med.git synced 2024-12-24 17:42:23 +00:00

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

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('.', '')