OSDN Git Service

BugTrack/779: Simplify. Use str_replace() instead of preg_replace() for simple replac...
[pukiwiki/pukiwiki.git] / plugin / comment.inc.php
index 701c6d6..1508462 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 // PukiWiki - Yet another WikiWikiWeb clone
-// $Id: comment.inc.php,v 1.33 2005/05/06 04:32:26 henoheno Exp $
+// $Id: comment.inc.php,v 1.34 2005/05/06 04:42:33 henoheno Exp $
 // Copyright (C)
 //   2002-2005 PukiWiki Developers Team
 //   2001-2002 Originally written by yu-ji
@@ -27,7 +27,7 @@ function plugin_comment_action()
 
        if (! isset($vars['msg'])) return array('msg'=>'', 'body'=>''); // Do nothing
 
-       $vars['msg'] = preg_replace("/\n/", '', $vars['msg']); // Cut LFs
+       $vars['msg'] = str_replace("\n", '', $vars['msg']); // Cut LFs
        $head = '';
        $match = array();
        if (preg_match('/^(-{1,2})-*\s*(.*)/', $vars['msg'], $match)) {