OSDN Git Service

BugTrack/177
authorpanda <panda>
Thu, 19 Dec 2002 09:53:18 +0000 (18:53 +0900)
committerpanda <panda>
Thu, 19 Dec 2002 09:53:18 +0000 (18:53 +0900)
plugin/vote.inc.php

index 6500675..e05e8a9 100644 (file)
@@ -1,5 +1,5 @@
 <?php
-// $Id: vote.inc.php,v 1.8 2002/11/29 00:09:01 panda Exp $
+// $Id: vote.inc.php,v 1.9 2002/12/19 09:53:18 panda Exp $
 
 function plugin_vote_init()
 {
@@ -39,7 +39,8 @@ function plugin_vote_action()
                                                $cnt = 0;
                                        }
 
-                                       if($post["vote_$arg"]==$_vote_plugin_votes) $cnt++;
+                                       $e_arg = encode($arg);
+                                       if($post["vote_$e_arg"]==$_vote_plugin_votes) $cnt++;
 
                                        $votes[] = $arg.'['.$cnt.']';
                                }
@@ -138,13 +139,14 @@ function plugin_vote_convert()
                }
 
                $link = make_link($arg);
+               $e_arg = encode($arg);
 
                if($tdcnt++ % 2) $cls = "vote_td1";
                else           $cls = "vote_td2";
 
                $string .= "<tr>"
                        .  "<td align=\"left\" class=\"$cls\" style=\"padding-left:1em;padding-right:1em;\" nowrap=\"nowrap\">$link</td>"
-                       .  "<td align=\"right\" class=\"$cls\" nowrap=\"nowrap\">$cnt&nbsp;&nbsp;<input type=\"submit\" name=\"vote_".htmlspecialchars($arg)."\" value=\"$_vote_plugin_votes\" class=\"submit\" /></td>"
+                       .  "<td align=\"right\" class=\"$cls\" nowrap=\"nowrap\">$cnt&nbsp;&nbsp;<input type=\"submit\" name=\"vote_".htmlspecialchars($e_arg)."\" value=\"$_vote_plugin_votes\" class=\"submit\" /></td>"
                        .  "</tr>\n";
        }