diff options
| author | Vasilij Schneidermann <mail@vasilij.de> | 2020-11-21 12:49:11 +0100 | 
|---|---|---|
| committer | Vasilij Schneidermann <mail@vasilij.de> | 2020-11-21 12:49:11 +0100 | 
| commit | 7845e3d01ee608691c44328c2e9ef4f3394470af (patch) | |
| tree | 3c800a04ee9f24db5bd4ca13d9cfea34cdd32d6b | |
| parent | 23e5d9c4c63e3a7dc08110a8dfcbb97a1186a37f (diff) | |
Encode attribute and text content in generated NCX
| -rw-r--r-- | nov.el | 5 | 
1 files changed, 4 insertions, 1 deletions
| @@ -49,6 +49,7 @@  (require 'image)  (require 'shr)  (require 'url-parse) +(require 'xml)  (require 'bookmark)  (require 'imenu) @@ -366,7 +367,9 @@ Each alist item consists of the identifier and full path."               (label (car (esxml-node-children label-node))))          (when (not href)            (error "Navigation point is missing href attribute")) -        (let ((link (format "<a href=\"%s\">%s</a>" href (or label href)))) +        (let ((link (format "<a href=\"%s\">%s</a>" +                            (xml-escape-string href) +                            (xml-escape-string (or label href)))))            (if children                (progn                  (insert (format "<li>\n%s\n<ol>\n" link)) | 
