mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-21 06:55:39 +00:00
shr: handle anonymous documents with an empty base
* lisp/net/shr.el (shr-parse-base): Make sure local is non-nil.
This commit is contained in:
parent
42393b9883
commit
bf49113d69
@ -950,7 +950,7 @@ When `shr-fill-text' is nil, only indent."
|
||||
;; NB: <base href=""> URI may itself be relative to the document's URI.
|
||||
(setq url (shr-expand-url url))
|
||||
(let* ((parsed (url-generic-parse-url url))
|
||||
(local (url-filename parsed)))
|
||||
(local (or (url-filename parsed) "")))
|
||||
(setf (url-filename parsed) "")
|
||||
;; Chop off the bit after the last slash.
|
||||
(when (string-match "\\`\\(.*/\\)[^/]+\\'" local)
|
||||
|
Loading…
Reference in New Issue
Block a user