From 00219fde67814f1cb4cbdd26384e1e858d25e6a6 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 5 Apr 2020 12:55:11 +0530 Subject: [PATCH] ... --- src/pyj/read_book/cfi.pyj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pyj/read_book/cfi.pyj b/src/pyj/read_book/cfi.pyj index ff4639108c..ed7a8ee08d 100644 --- a/src/pyj/read_book/cfi.pyj +++ b/src/pyj/read_book/cfi.pyj @@ -176,7 +176,7 @@ def encode(doc, node, offset, tail): # {{{ child = child.nextSibling # Add id assertions for robustness where possible - id = node.getAttribute('id') if node.getAttribute else None + id = node.id idspec = ('[' + escape_for_cfi(id) + ']') if id else '' cfi = '/' + index + idspec + cfi node = p