From 6c10a875dea37537fe707790204769c9136239fe Mon Sep 17 00:00:00 2001 From: Florian Mounier Date: Thu, 16 Jul 2015 15:18:35 +0200 Subject: [PATCH] My mistake --- docs/changelog.rst | 2 +- pygal/graph/public.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index 125e425..a45706e 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -30,7 +30,7 @@ Changelog * Fix timezones in DateTimeLine * Rename in Style foreground_light as foreground_strong * Rename in Style foreground_dark as foreground_subtle -* Add a ``render_data_uri`` method +* Add a ``render_data_uri`` method (#237) 1.7.0 ===== diff --git a/pygal/graph/public.py b/pygal/graph/public.py index b83d60e..e84f163 100644 --- a/pygal/graph/public.py +++ b/pygal/graph/public.py @@ -98,7 +98,7 @@ class PublicApi(BaseGraph): # Force protocol as data uri have none kwargs.setdefault('force_uri_protocol', 'https') return "data:image/svg+xml;charset=utf-8;base64,%s" % ( - base64.urlsafe_b64encode( + base64.b64encode( self.render(**kwargs) ).decode('utf-8').replace('\n', '') )