diff options
-rw-r--r-- | nov.el | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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>" |