From 354ff8649e99deb4fb43c0aad37d8f99bf07ed5a Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Tue, 17 Jul 2012 22:09:55 +0000 Subject: [PATCH] shr.el (shr-expand-url): Handle URL starting with `//' --- lisp/ChangeLog | 4 ++++ lisp/shr.el | 3 +++ 2 files changed, 7 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4e7375091..eb9aaed02 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2012-07-17 Andreas Schwab + + * shr.el (shr-expand-url): Handle URL starting with `//'. + 2012-07-13 Chong Yidong * smime.el (smime-certificate-info): Set buffer-read-only directly, diff --git a/lisp/shr.el b/lisp/shr.el index bf6e57e8d..e7a6c5d20 100644 --- a/lisp/shr.el +++ b/lisp/shr.el @@ -484,6 +484,9 @@ size, and full-buffer size." (string-match "\\`[a-z]*:" url) (not shr-base)) url) + ((and (string-match "\\`//" url) + (string-match "\\`[a-z]*:" shr-base)) + (concat (match-string 0 shr-base) url)) ((and (not (string-match "/\\'" shr-base)) (not (string-match "\\`/" url))) (concat shr-base "/" url)) -- 2.25.1