aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2010-01-02 15:14:54 -0500
committerChong Yidong2010-01-02 15:14:54 -0500
commitda76998b6863a34fc3f81765bd706a08256b9af7 (patch)
treef7092e8608c961add23ea36dfdef2f028cb099d9
parentb2ad70b67bb8760a53192322a351b3c8d7376c64 (diff)
downloademacs-da76998b6863a34fc3f81765bd706a08256b9af7.tar.gz
emacs-da76998b6863a34fc3f81765bd706a08256b9af7.zip
* net/browse-url.el (browse-url-encode-url): Don't escape commas.
They are valid characters in URL paths (rfc3986), and at least Firefox does not understand the encoded version (Bug#3166).
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/net/browse-url.el12
2 files changed, 13 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index a6ca9dd4dde..cfde9093e75 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12010-01-02 Chong Yidong <cyd@stupidchicken.com>
2
3 * net/browse-url.el (browse-url-encode-url): Don't escape commas.
4 They are valid characters in URL paths (rfc3986), and at least
5 Firefox does not understand the encoded version (Bug#3166).
6
12010-01-02 Daniel Elliott <danelliottster@gmail.com> (tiny change) 72010-01-02 Daniel Elliott <danelliottster@gmail.com> (tiny change)
2 8
3 * progmodes/octave-mod.el (octave-end-keywords) 9 * progmodes/octave-mod.el (octave-end-keywords)
diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el
index e52f4cb924a..5619108241c 100644
--- a/lisp/net/browse-url.el
+++ b/lisp/net/browse-url.el
@@ -613,7 +613,7 @@ down (this *won't* always work)."
613 613
614(defun browse-url-url-encode-chars (text chars) 614(defun browse-url-url-encode-chars (text chars)
615 "URL-encode the chars in TEXT that match CHARS. 615 "URL-encode the chars in TEXT that match CHARS.
616CHARS is a regexp-like character alternative (e.g., \"[,)$]\")." 616CHARS is a regexp-like character alternative (e.g., \"[)$]\")."
617 (let ((encoded-text (copy-sequence text)) 617 (let ((encoded-text (copy-sequence text))
618 (s 0)) 618 (s 0))
619 (while (setq s (string-match chars encoded-text s)) 619 (while (setq s (string-match chars encoded-text s))
@@ -626,10 +626,12 @@ CHARS is a regexp-like character alternative (e.g., \"[,)$]\")."
626 626
627(defun browse-url-encode-url (url) 627(defun browse-url-encode-url (url)
628 "Escape annoying characters in URL. 628 "Escape annoying characters in URL.
629The annoying characters are those that can mislead a webbrowser 629The annoying characters are those that can mislead a web browser
630regarding its parameter treatment. For instance, `,' can 630regarding its parameter treatment."
631be misleading because it could be used to separate URLs." 631 ;; FIXME: Is there an actual example of a web browser getting
632 (browse-url-url-encode-chars url "[,)$]")) 632 ;; confused? (This used to encode commas, but at least Firefox
633 ;; handles commas correctly and doesn't accept encoded commas.)
634 (browse-url-url-encode-chars url "[)$]"))
633 635
634;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 636;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
635;; URL input 637;; URL input