We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 121508a commit bcf573eCopy full SHA for bcf573e
1 file changed
folium/element.py
@@ -11,6 +11,7 @@
11
ENV = Environment(loader=PackageLoader('folium', 'templates'))
12
from collections import OrderedDict
13
import json
14
+import base64
15
16
from .six import urlopen
17
from .utilities import _camelify, _parse_size
@@ -266,7 +267,7 @@ def _repr_html_(self, **kwargs):
266
267
268
iframe = '<iframe src="{html}" width="{width}px" height="{height}px"></iframe>'\
269
.format(\
- html = "data:text/html;base64,"+html.encode('utf8').encode('base64'),
270
+ html = b"data:text/html;base64,"+base64.b64encode(html.encode('utf8')),
271
#html = self.HTML.replace('"','"'),
272
width = int(60.*width),
273
height= int(60.*height),
0 commit comments