GNU bug report logs - #18825
eww does not handle file:/file/name properly

Previous Next

Package: emacs;

Reported by: Ivan Shmakov <ivan <at> siamics.net>

Date: Sat, 25 Oct 2014 12:19:02 UTC

Severity: minor

Tags: patch

Done: Ted Zlatanov <tzz <at> lifelogs.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 18825 in the body.
You can then email your comments to 18825 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#18825; Package emacs. (Sat, 25 Oct 2014 12:19:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ivan Shmakov <ivan <at> siamics.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 25 Oct 2014 12:19:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ivan Shmakov <ivan <at> siamics.net>
To: submit <at> debbugs.gnu.org
Subject: eww does not handle file:/file/name properly 
Date: Sat, 25 Oct 2014 12:17:50 +0000
[Message part 1 (text/plain, inline)]
Package:  emacs
Severity: minor
Tags:     patch

	The condition currently employed in ‘eww’ for file: scheme URIs
	is a bit more restrictive than necessary:

   156	;;;###autoload
   157	(defun eww (url)
   158	  "Fetch URL and render the page.
   159	If the input doesn't look like an URL or a domain name, the
   160	word(s) will be searched for via `eww-search-prefix'."
   161	  (interactive "sEnter URL or keywords: ")
   162	  (cond ((string-match-p "\\`file://" url))
   163	        ((string-match-p "\\`ftp://" url)
   164	         (user-error "FTP is not supported."))

	While RFC 1738 does not allow for no-authority file: URIs,
	RFC 3986 makes the authority part optional /in general,/ and
	recognizing file:/name as synonymous to file:///name looks like
	a common extension over the RFC 1738 syntax.

	I thus suggest the condition to be relaxed to only include a
	single slash after ‘file:’.

-- 
FSF associate member #7257  http://boycottsystemd.org/  … 3013 B6A0 230E 334A
[Message part 2 (text/diff, inline)]
--- eww.el
+++ eww.el
@@ -159,7 +159,7 @@ eww (url)
 If the input doesn't look like an URL or a domain name, the
 word(s) will be searched for via `eww-search-prefix'."
   (interactive "sEnter URL or keywords: ")
-  (cond ((string-match-p "\\`file://" url))
+  (cond ((string-match-p "\\`file:/" url))
         ((string-match-p "\\`ftp://" url)
          (user-error "FTP is not supported."))
         (t

Reply sent to Ted Zlatanov <tzz <at> lifelogs.com>:
You have taken responsibility. (Sun, 02 Nov 2014 21:09:02 GMT) Full text and rfc822 format available.

Notification sent to Ivan Shmakov <ivan <at> siamics.net>:
bug acknowledged by developer. (Sun, 02 Nov 2014 21:09:02 GMT) Full text and rfc822 format available.

Message #10 received at 18825-done <at> debbugs.gnu.org (full text, mbox):

From: Ted Zlatanov <tzz <at> lifelogs.com>
To: Ivan Shmakov <ivan <at> siamics.net>
Cc: 18825-done <at> debbugs.gnu.org
Subject: Re: bug#18825: eww does not handle file:/file/name properly
Date: Sun, 02 Nov 2014 16:08:24 -0500
On Sat, 25 Oct 2014 12:17:50 +0000 Ivan Shmakov <ivan <at> siamics.net> wrote: 

IS> -  (cond ((string-match-p "\\`file://" url))
IS> +  (cond ((string-match-p "\\`file:/" url))

Thanks for the patch; applied in your name.  Closing.

Ted




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 01 Dec 2014 12:24:05 GMT) Full text and rfc822 format available.

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

Previous Next


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