bongo-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bongo-patches] Require that URI schemes be at least two characters long


From: Daniel Brockman
Subject: [bongo-patches] Require that URI schemes be at least two characters long
Date: Sun, 31 Dec 2006 05:53:49 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Sun Dec 31 05:50:01 CET 2006  Daniel Brockman <address@hidden>

 * Require that URI schemes be at least two characters long.

diff -rN -u old-bongo/bongo.el new-bongo/bongo.el
--- old-bongo/bongo.el  2006-12-31 05:53:40.000000000 +0100
+++ new-bongo/bongo.el  2006-12-31 05:53:41.000000000 +0100
@@ -8,7 +8,7 @@
 ;; Author: Daniel Brockman <address@hidden>
 ;; URL: http://www.brockman.se/software/bongo/
 ;; Created: September 3, 2005
-;; Updated: December 30, 2006
+;; Updated: December 31, 2006
 
 ;; This file is free software; you can redistribute it and/or
 ;; modify it under the terms of the GNU General Public License as
@@ -1705,12 +1705,14 @@
   (funcall bongo-infoset-from-file-name-function file-name))
 
 (defun bongo-uri-scheme (file-name)
-  "Return the URI scheme of FILE-NAME, or nil if it has none."
+  "Return the URI scheme of FILE-NAME, or nil if it has none.
+To avoid treating Microsoft Windows and DOS drive letters as URI schemes,
+we require that URI schemes be at least two characters long."
   (when (string-match (eval-when-compile
                         (rx (and string-start
                                  (submatch
                                   (any "a-zA-Z")
-                                  (zero-or-more
+                                  (one-or-more
                                    (or (any "address@hidden&!*\"'(),")
                                        (and "%" (repeat 2 hex-digit)))))
                                  ":")))
-- 
Daniel Brockman <address@hidden>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]