comparison lisp/net/browse-url.el @ 84458:6a870293225d

(browse-url-encode-url): Use copy-sequence.
author Thien-Thi Nguyen <ttn@gnuvola.org>
date Mon, 10 Sep 2007 18:22:48 +0000
parents f12fc8e7482c
children c431e16c1635
comparison
equal deleted inserted replaced
84457:33b5c158a227 84458:6a870293225d
619 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 619 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
620 ;; URL encoding 620 ;; URL encoding
621 621
622 (defun browse-url-encode-url (url) 622 (defun browse-url-encode-url (url)
623 "Encode all `confusing' characters in URL." 623 "Encode all `confusing' characters in URL."
624 (let ((encoded-url (copy-seq url))) 624 (let ((encoded-url (copy-sequence url)))
625 (while (string-match "%" encoded-url) 625 (while (string-match "%" encoded-url)
626 (setq encoded-url (replace-match "%25" t t encoded-url))) 626 (setq encoded-url (replace-match "%25" t t encoded-url)))
627 (while (string-match "[*\"()',=;? ]" encoded-url) 627 (while (string-match "[*\"()',=;? ]" encoded-url)
628 (setq encoded-url 628 (setq encoded-url
629 (replace-match (format "%%%x" 629 (replace-match (format "%%%x"