Commit da76998b authored by Chong Yidong's avatar Chong Yidong
Browse files

* 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).
parent b2ad70b6
2010-01-02 Chong Yidong <cyd@stupidchicken.com>
* 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).
2010-01-02 Daniel Elliott <danelliottster@gmail.com> (tiny change) 2010-01-02 Daniel Elliott <danelliottster@gmail.com> (tiny change)
* progmodes/octave-mod.el (octave-end-keywords) * progmodes/octave-mod.el (octave-end-keywords)
......
...@@ -613,7 +613,7 @@ down (this *won't* always work)." ...@@ -613,7 +613,7 @@ down (this *won't* always work)."
(defun browse-url-url-encode-chars (text chars) (defun browse-url-url-encode-chars (text chars)
"URL-encode the chars in TEXT that match CHARS. "URL-encode the chars in TEXT that match CHARS.
CHARS is a regexp-like character alternative (e.g., \"[,)$]\")." CHARS is a regexp-like character alternative (e.g., \"[)$]\")."
(let ((encoded-text (copy-sequence text)) (let ((encoded-text (copy-sequence text))
(s 0)) (s 0))
(while (setq s (string-match chars encoded-text s)) (while (setq s (string-match chars encoded-text s))
...@@ -626,10 +626,12 @@ CHARS is a regexp-like character alternative (e.g., \"[,)$]\")." ...@@ -626,10 +626,12 @@ CHARS is a regexp-like character alternative (e.g., \"[,)$]\")."
(defun browse-url-encode-url (url) (defun browse-url-encode-url (url)
"Escape annoying characters in URL. "Escape annoying characters in URL.
The annoying characters are those that can mislead a webbrowser The annoying characters are those that can mislead a web browser
regarding its parameter treatment. For instance, `,' can regarding its parameter treatment."
be misleading because it could be used to separate URLs." ;; FIXME: Is there an actual example of a web browser getting
(browse-url-url-encode-chars url "[,)$]")) ;; confused? (This used to encode commas, but at least Firefox
;; handles commas correctly and doesn't accept encoded commas.)
(browse-url-url-encode-chars url "[)$]"))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; URL input ;; URL input
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment