GNU bug report logs - #18310
24.3.93; relative links don't work in eww and Windows 7

Previous Next

Package: emacs;

Reported by: joaotavora <at> gmail.com (João Távora)

Date: Thu, 21 Aug 2014 10:35:01 UTC

Severity: normal

Found in version 24.3.93

Fixed in version 24.3.94

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: joaotavora <at> gmail.com (João Távora)
To: Eli Zaretskii <eliz <at> gnu.org>, monnier <at> iro.umontreal.ca
Cc: 18310 <at> debbugs.gnu.org
Subject: bug#18310: 24.3.93; relative links don't work in eww and Windows 7
Date: Mon, 25 Aug 2014 18:23:11 +0100
Eli Zaretskii <eliz <at> gnu.org> writes:

>> PS: Had a look at `url-expand-file-name': isn't it doing to much for
>> `shr-expand-url''s purposes?
>
> I have no idea, but as long as you need to resolve relative URLs, it
> is your friend.

Back on topic, the diff in PS seems to work. With the new calling
convention, of first concatenating the car and cadr of `base', so does
`expand-file-name', by the way.

Can anyone verify and install it?

João

diff --git a/lisp/net/shr.el b/lisp/net/shr.el
index 5844257..244d6d6 100644
--- a/lisp/net/shr.el
+++ b/lisp/net/shr.el
@@ -32,6 +32,8 @@
 
 (eval-when-compile (require 'cl))
 (eval-when-compile (require 'url))      ;For url-filename's setf handler.
+
+(require 'url-expand)                  ; For url-expand-file-name
 (require 'browse-url)
 
 (defgroup shr nil
@@ -610,7 +612,7 @@ size, and full-buffer size."
 	 (concat (nth 3 base) url))
 	(t
 	 ;; Totally relative.
-	 (concat (car base) (expand-file-name url (cadr base))))))
+         (url-expand-file-name url (concat (car base) (cadr base))))))
 
 (defun shr-ensure-newline ()
   (unless (zerop (current-column))




This bug report was last modified 10 years and 248 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.