* shr.el (shr-parse-base): Fix parsing error.
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Sun, 16 Jun 2013 13:20:21 +0000 (15:20 +0200)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Sun, 16 Jun 2013 13:20:21 +0000 (15:20 +0200)
lisp/ChangeLog
lisp/shr.el

index 6980d58..e619d45 100644 (file)
@@ -1,5 +1,7 @@
 2013-06-16  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
+       * shr.el (shr-parse-base): Fix parsing error.
+
        * eww.el (eww-submit): Pass the base in to `shr-expand-url'.
 
        * shr.el (shr-parse-base): New function.
index 13f376b..a8996bc 100644 (file)
@@ -488,8 +488,8 @@ size, and full-buffer size."
   (let* ((parsed (url-generic-parse-url url))
         (local (url-filename parsed)))
     (setf (url-filename parsed) "")
-    ;; Chop off query string.
-    (when (string-match "\\`\\([^?]+\\)[?]" local)
+    ;; Chop off the bit after the last slash.
+    (when (string-match "\\`\\(.*/\\)[^/]+\\'" local)
       (setq local (match-string 1 local)))
     ;; Always make the local bit end with a slash.
     (when (and (not (zerop (length local)))