projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
832d756
)
Handle gracefully href="" in base tags in shr
author
Łukasz Stelmach
<stlman@poczta.fm>
Tue, 22 Dec 2020 06:47:23 +0000
(07:47 +0100)
committer
Lars Ingebrigtsen
<larsi@gnus.org>
Wed, 23 Dec 2020 05:26:06 +0000
(06:26 +0100)
* net/shr.el (shr-tag-base): shr-parse-base can't handle empty
strings gracefully. Don't call it unless href is a non-empty
string (bug#45355).
lisp/net/shr.el
patch
|
blob
|
history
diff --git
a/lisp/net/shr.el
b/lisp/net/shr.el
index 2e5dd5ffa50c2ab765d59d7119941b36dc643380..1648e56cfb4ae1b36e623d48400c01c2304dd30a 100644
(file)
--- a/
lisp/net/shr.el
+++ b/
lisp/net/shr.el
@@
-1516,8
+1516,9
@@
ones, in case fg and bg are nil."
plist)))
(defun shr-tag-base (dom)
- (when-let* ((base (dom-attr dom 'href)))
- (setq shr-base (shr-parse-base base)))
+ (let ((base (dom-attr dom 'href)))
+ (when (> (length base) 0)
+ (setq shr-base (shr-parse-base base))))
(shr-generic dom))
(defun shr-tag-a (dom)