aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nov.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/nov.el b/nov.el
index 7476b7e..739a930 100644
--- a/nov.el
+++ b/nov.el
@@ -399,10 +399,11 @@ Each alist item consists of the identifier and full path."
(mapc (lambda (node) (nov--walk-ncx-node node)) children)
(insert "</ol>\n"))
((eq tag 'navPoint)
- (let* ((label-node (esxml-query "navLabel>text" node))
- (content-node (esxml-query "content" node))
+ (let* ((navlabel-node (dom-by-tag node 'navLabel))
+ (label-node (dom-by-tag navlabel-node 'text))
+ (content-node (dom-by-tag node 'content))
(href (nov-urldecode (dom-attr content-node 'src)))
- (label (car (dom-children label-node))))
+ (label (and label-node (car (dom-children label-node)))))
(when (not href)
(error "Navigation point is missing href attribute"))
(let ((link (format "<a href=\"%s\">%s</a>"