OSDN Git Service

[[pukiwiki:BugTrack/49]] magic_quotes問題
authormasui <masui>
Mon, 1 Jul 2002 11:53:20 +0000 (20:53 +0900)
committermasui <masui>
Mon, 1 Jul 2002 11:53:20 +0000 (20:53 +0900)
plugin/comment.inc.php

index a3a570c..9bd5066 100644 (file)
@@ -1,5 +1,5 @@
 <?
-// $Id: comment.inc.php,v 1.4 2002/07/01 07:07:54 masui Exp $
+// $Id: comment.inc.php,v 1.5 2002/07/01 11:53:20 masui Exp $
 
 global $name_cols, $comment_cols, $msg_format, $name_format;
 global $msg_format, $now_format, $comment_format;
@@ -37,6 +37,10 @@ function plugin_comment_action()
        global $_title_collided,$_msg_collided,$_title_updated;
        global $_msg_comment_collided,$_title_comment_collided;
 
+       if(get_magic_quotes_gpc() {
+         if($post["name"]) $post["name"] = stripslashes($post["name"]);
+       }
+       
        $_comment_format = $comment_format;
        if($post["nodate"]=="1") {
                $_comment_format = str_replace('$now','',$_comment_format);