Mercurial > emacs
comparison lisp/url/url-util.el @ 65312:915d671fef52
*** empty log message ***
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Thu, 01 Sep 2005 16:38:39 +0000 |
parents | 875dcc490074 |
children | e8a3fb527b77 532e0a9335a9 |
comparison
equal
deleted
inserted
replaced
65311:bea70b37d446 | 65312:915d671fef52 |
---|---|
268 (file-name-directory (substring file 0 (match-beginning 0))))) | 268 (file-name-directory (substring file 0 (match-beginning 0))))) |
269 (x (file-name-nondirectory file)) | 269 (x (file-name-nondirectory file)) |
270 (t (file-name-directory file)))) | 270 (t (file-name-directory file)))) |
271 | 271 |
272 ;;;###autoload | 272 ;;;###autoload |
273 (defun url-parse-query-string (query &optional downcase) | 273 (defun url-parse-query-string (query &optional downcase allow-newlines) |
274 (let (retval pairs cur key val) | 274 (let (retval pairs cur key val) |
275 (setq pairs (split-string query "&")) | 275 (setq pairs (split-string query "&")) |
276 (while pairs | 276 (while pairs |
277 (setq cur (car pairs) | 277 (setq cur (car pairs) |
278 pairs (cdr pairs)) | 278 pairs (cdr pairs)) |
279 (if (not (string-match "=" cur)) | 279 (if (not (string-match "=" cur)) |
280 nil ; Grace | 280 nil ; Grace |
281 (setq key (url-unhex-string (substring cur 0 (match-beginning 0))) | 281 (setq key (url-unhex-string (substring cur 0 (match-beginning 0)) |
282 val (url-unhex-string (substring cur (match-end 0) nil))) | 282 allow-newlines)) |
283 (setq val (url-unhex-string (substring cur (match-end 0) nil) | |
284 allow-newlines)) | |
283 (if downcase | 285 (if downcase |
284 (setq key (downcase key))) | 286 (setq key (downcase key))) |
285 (setq cur (assoc key retval)) | 287 (setq cur (assoc key retval)) |
286 (if cur | 288 (if cur |
287 (setcdr cur (cons val (cdr cur))) | 289 (setcdr cur (cons val (cdr cur))) |