strip html tags from book metadata

This commit is contained in:
j 2016-02-04 15:25:27 +05:30
commit 8c5f21c83d
2 changed files with 12 additions and 1 deletions

View file

@ -15,7 +15,7 @@ from . import epub
from . import txt
from . import opf
from meta.utils import decode_html_data, to_isbn13
from meta.utils import decode_html_data, strip_tags_data, to_isbn13
import settings
import logging
@ -115,6 +115,7 @@ def metadata(f, from_=None):
if not data['title'].strip():
del data['title']
data = decode_html_data(data)
data = strip_tags_data(data)
for key in list(data):
if not data[key]:
del data[key]