mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-16 17:24:23 +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
1 changed files with 3 additions and 0 deletions
|
|
@ -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 a new issue