emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master bf49113d696: shr: handle anonymous documents with an empty base


From: Andreas Schwab
Subject: master bf49113d696: shr: handle anonymous documents with an empty base
Date: Fri, 11 Oct 2024 02:53:28 -0400 (EDT)

branch: master
commit bf49113d696b00971d756ce2b67fe15c0ff1ba81
Author: Andreas Schwab <schwab@linux-m68k.org>
Commit: Andreas Schwab <schwab@linux-m68k.org>

    shr: handle anonymous documents with an empty base
    
    * lisp/net/shr.el (shr-parse-base): Make sure local is non-nil.
---
 lisp/net/shr.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/net/shr.el b/lisp/net/shr.el
index cd0e482aee7..f1062acf7e4 100644
--- a/lisp/net/shr.el
+++ b/lisp/net/shr.el
@@ -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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]