(www-batch-view): Fix problem when decoding URL-encoding of genre.
authorMORIOKA Tomohiko <tomo.git@chise.org>
Thu, 13 Sep 2012 02:02:09 +0000 (11:02 +0900)
committerMORIOKA Tomohiko <tomo.git@chise.org>
Thu, 13 Sep 2012 02:02:09 +0000 (11:02 +0900)
cwiki-view.el

index 85dc284..98187cc 100644 (file)
@@ -381,7 +381,7 @@ size=\"30\" maxlength=\"30\" value=\"%s\" />"
                           (car (split-string accept-language ","))
                           ";"))
                     "-"))))
-            ret)
+            ret genre)
        (princ "Content-Type: text/html; charset=UTF-8
 
 <!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"
@@ -401,12 +401,13 @@ size=\"30\" maxlength=\"30\" value=\"%s\" />"
          (setq target
                (mapcar (lambda (cell)
                          (if (string-match "=" cell)
-                             (cons
-                              (intern
-                               (decode-uri-string
-                                (substring cell 0 (match-beginning 0))
-                                'utf-8-mcs-er))
-                              (substring cell (match-end 0)))
+                             (progn
+                               (setq genre (substring cell 0 (match-beginning 0))
+                                     ret (substring cell (match-end 0)))
+                               (cons
+                                (intern
+                                 (decode-uri-string genre 'utf-8-mcs-er))
+                                ret))
                            (list (decode-uri-string cell 'utf-8-mcs-er))))
                        (split-string target "&")))
          (setq ret (car target))