Commit 9345e638 authored by Lars Ingebrigtsen's avatar Lars Ingebrigtsen
Browse files

Don't bug out on all-whitespace URLs

* lisp/net/shr.el (shr-expand-url): Don't bug out on
degenerate all-whitespace URLs.
parent 3b9cbacf
......@@ -788,11 +788,12 @@ size, and full-buffer size."
;; Strip leading whitespace
(and url (string-match "\\`\\s-+" url)
(setq url (substring url (match-end 0))))
(cond ((or (not url)
(not base)
(cond ((zerop (length url))
(nth 3 base))
((or (not base)
(string-match "\\`[a-z]*:" url))
;; Absolute or empty URI
(or url (nth 3 base)))
((eq (aref url 0) ?/)
(if (and (> (length url) 1)
(eq (aref url 1) ?/))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment