##// END OF EJS Templates
Backport PR #4092: nbconvert: Fix for unicode html headers, Windows + Python 2.x...
MinRK -
Show More
@@ -80,7 +80,7 b' def add_anchor(html):'
80
80
81 For use in heading cells
81 For use in heading cells
82 """
82 """
83 h = ElementTree.fromstring(py3compat.cast_bytes_py2(html))
83 h = ElementTree.fromstring(py3compat.cast_bytes_py2(html, encoding='utf-8'))
84 link = html2text(h).replace(' ', '-')
84 link = html2text(h).replace(' ', '-')
85 h.set('id', link)
85 h.set('id', link)
86 a = ElementTree.Element("a", {"class" : "anchor-link", "href" : "#" + link})
86 a = ElementTree.Element("a", {"class" : "anchor-link", "href" : "#" + link})
General Comments 0
You need to be logged in to leave comments. Login now