* bug#18825: eww does not handle file:/file/name properly
@ 2014-10-25 12:17 Ivan Shmakov
2014-11-02 21:08 ` Ted Zlatanov
0 siblings, 1 reply; 2+ messages in thread
From: Ivan Shmakov @ 2014-10-25 12:17 UTC (permalink / raw)
To: 18825
[-- Attachment #1: Type: text/plain, Size: 1027 bytes --]
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
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/diff, Size: 405 bytes --]
--- 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-11-02 21:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-25 12:17 bug#18825: eww does not handle file:/file/name properly Ivan Shmakov
2014-11-02 21:08 ` Ted Zlatanov
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.