diff options
author | Casey Deccio <casey@deccio.net> | 2016-07-29 15:40:23 +0300 |
---|---|---|
committer | Casey Deccio <casey@deccio.net> | 2016-07-29 15:40:23 +0300 |
commit | 148319cb2d563be46c42af99d1f945466f9c9528 (patch) | |
tree | 9da7f4eb95f0fd8673007f90241e4994bb142b1e | |
parent | bd3311de3438bf568b6cfd0e62201ba01e3c4a79 (diff) | |
parent | 0fc237e60fb63404a9d90c5e3b2325a3fff7010d (diff) |
Merge branch 'master' into localres
-rw-r--r-- | dnsviz/commands/graph.py | 2 | ||||
-rw-r--r-- | dnsviz/viz/dnssec.py | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/dnsviz/commands/graph.py b/dnsviz/commands/graph.py index b1897da..3ba03ab 100644 --- a/dnsviz/commands/graph.py +++ b/dnsviz/commands/graph.py @@ -79,7 +79,7 @@ def finish_graph(G, name_objs, rdtypes, trusted_keys, fmt, filename): if fmt == 'html': try: - js_img = G.draw('js') + js_img = codecs.decode(G.draw('js'), 'utf-8') except IOError as e: logger.error(str(e)) sys.exit(3) diff --git a/dnsviz/viz/dnssec.py b/dnsviz/viz/dnssec.py index 5be159c..70306ba 100644 --- a/dnsviz/viz/dnssec.py +++ b/dnsviz/viz/dnssec.py @@ -27,6 +27,7 @@ from __future__ import unicode_literals +import codecs import cgi import collections import errno @@ -268,7 +269,7 @@ class DNSAuthGraph: s += self._write_raphael_node(dom.documentElement, None, 's\'+this.imageScale+\',\'+this.imageScale+\',0,0') s += '\tpaper.setViewBox(0, 0, imageWidth, imageHeight);\n' s += '}\n' - return s + return codecs.encode(s, 'utf-8') def draw(self, format, path=None): if format == 'js': |