Fix #6655: image URLs containing data: causes gettext builder crashed

This commit is contained in:
Takeshi KOMIYA
2019-08-20 23:49:20 +09:00
parent 63757596b1
commit eae7caa5ab
2 changed files with 3 additions and 1 deletions

View File

@@ -16,6 +16,8 @@ Features added
Bugs fixed
----------
* #6655: image URLs containing ``data:`` causes gettext builder crashed
Testing
--------

View File

@@ -130,7 +130,7 @@ class DataURIExtractor(BaseImageConverter):
elif self.app.builder.supported_data_uri_images is True:
return False
else:
return 'data:' in node['uri']
return node['uri'].startswith('data:')
def handle(self, node):
# type: (nodes.image) -> None