Skip to content

Commit

Permalink
Merge pull request #924 from Tontyna/titlefix
Browse files Browse the repository at this point in the history
fix erroneous document title
  • Loading branch information
liZe authored Aug 17, 2019
2 parents 4f544e5 + b5a4cb7 commit 7050c2c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions weasyprint/html.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,11 +307,11 @@ def get_html_metadata(wrapper_element, base_url):
elif element.tag == 'link' and element_has_link_type(
element, 'attachment'):
url = get_url_attribute(element, 'href', base_url)
title = element.get('title', None)
atitle = element.get('title', None)
if url is None:
LOGGER.error('Missing href in <link rel="attachment">')
else:
attachments.append((url, title))
attachments.append((url, atitle))
return dict(title=title, description=description, generator=generator,
keywords=keywords, authors=authors,
created=created, modified=modified,
Expand Down

0 comments on commit 7050c2c

Please sign in to comment.