shr.el (shr-expand-url): Handle URL starting with `//'
authorAndreas Schwab <schwab@linux-m68k.org>
Tue, 17 Jul 2012 22:09:55 +0000 (22:09 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Tue, 17 Jul 2012 22:09:55 +0000 (22:09 +0000)
lisp/ChangeLog
lisp/shr.el

index 4e73750..eb9aaed 100644 (file)
@@ -1,3 +1,7 @@
+2012-07-17  Andreas Schwab  <schwab@linux-m68k.org>
+
+       * shr.el (shr-expand-url): Handle URL starting with `//'.
+
 2012-07-13  Chong Yidong  <cyd@gnu.org>
 
        * smime.el (smime-certificate-info): Set buffer-read-only directly,
index bf6e57e..e7a6c5d 100644 (file)
@@ -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))