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.
(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)))