diff --git a/IPython/core/tests/test_pylabtools.py b/IPython/core/tests/test_pylabtools.py index a80ed96..16ced0f 100644 --- a/IPython/core/tests/test_pylabtools.py +++ b/IPython/core/tests/test_pylabtools.py @@ -51,7 +51,7 @@ def test_figure_to_svg(): ax.plot([1,2,3]) plt.draw() svg = pt.print_figure(fig, 'svg')[:100].lower() - nt.assert_in('doctype svg', svg) + nt.assert_in(b'doctype svg', svg) def test_import_pylab(): diff --git a/IPython/nbconvert/filters/citation.py b/IPython/nbconvert/filters/citation.py index a057420..1442d55 100644 --- a/IPython/nbconvert/filters/citation.py +++ b/IPython/nbconvert/filters/citation.py @@ -39,7 +39,7 @@ def citation2latex(s): tree = html.fragment_fromstring(s, create_parent='div') _process_node_cite(tree) - s = html.tostring(tree) + s = html.tostring(tree, encoding='unicode') if s.endswith(''): s = s[:-6] if s.startswith('
'):