mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-02-01 20:06:00 +00:00
shr: strip leading whitespace when expanding URLs
* lisp/net/shr.el (shr-expand-url): Strip leading whitespace from URL.
This commit is contained in:
parent
422f15d9d6
commit
2f3011a466
@ -709,6 +709,9 @@ size, and full-buffer size."
|
||||
shr-base))
|
||||
(when (zerop (length url))
|
||||
(setq url nil))
|
||||
;; Strip leading whitespace
|
||||
(and url (string-match "\\`\\s-+" url)
|
||||
(setq url (substring url (match-end 0))))
|
||||
(cond ((or (not url)
|
||||
(not base)
|
||||
(string-match "\\`[a-z]*:" url))
|
||||
|
Loading…
Reference in New Issue
Block a user