Merge pull request #4610 from tk0miya/4608_invalid_metatag_for_epub

Fix #4608: epub: Invalid meta tag is generated
This commit is contained in:
Takeshi KOMIYA 2018-02-14 00:34:24 +09:00 committed by GitHub
commit 82d09f2256
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 2 deletions

View File

@ -16,6 +16,8 @@ Features added
Bugs fixed
----------
* #4608: epub: Invalid meta tag is generated
Testing
--------

View File

@ -143,6 +143,7 @@ class Epub3Builder(_epub_base.EpubBuilder):
self.globalcontext['theme_writing_mode'] = THEME_WRITING_MODES.get(writing_mode)
self.globalcontext['html_tag'] = self.html_tag
self.globalcontext['use_meta_charset'] = self.use_meta_charset
self.globalcontext['skip_ua_compatible'] = True
def build_navlist(self, navnodes):
# type: (List[nodes.Node]) -> List[NavPoint]

View File

@ -111,8 +111,8 @@
<html xmlns="http://www.w3.org/1999/xhtml"{% if language is not none %} lang="{{ language }}"{% endif %}>
{%- endif %}
<head>
{%- if not html5_doctype %}
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
{%- if not html5_doctype and not skip_ua_compatible %}
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
{%- endif %}
{%- if use_meta_charset or html5_doctype %}
<meta charset="{{ encoding }}" />