OSDN Git Service

BugTrack2/171: Added a PCRE modifiers ''S''.
authorteanan <teanan>
Sat, 15 Apr 2006 17:33:35 +0000 (02:33 +0900)
committerteanan <teanan>
Sat, 15 Apr 2006 17:33:35 +0000 (02:33 +0900)
lib/func.php
lib/html.php

index c0c4bb7..9526822 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 // PukiWiki - Yet another WikiWikiWeb clone.
-// $Id: func.php,v 1.58 2006/04/15 02:50:21 teanan Exp $
+// $Id: func.php,v 1.59 2006/04/15 17:33:35 teanan Exp $
 // Copyright (C)
 //   2002-2006 PukiWiki Developers Team
 //   2001-2002 Originally written by yu-ji
@@ -239,7 +239,7 @@ function do_search($word, $type = 'AND', $non_format = FALSE, $base = '')
 
                $b_match = FALSE;
                foreach ($keys as $key) {
-                       $b_match = preg_match('/' . $key . '/', $source);
+                       $b_match = preg_match('/' . $key . '/S', $source);
                        if ($b_match xor $b_type) break;
                }
                if ($b_match) $pages[$page] = get_filetime($page);
index 8023a6f..c5047d7 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 // PukiWiki - Yet another WikiWikiWeb clone.
-// $Id: html.php,v 1.56 2006/04/15 02:50:21 teanan Exp $
+// $Id: html.php,v 1.57 2006/04/15 17:33:35 teanan Exp $
 // Copyright (C)
 //   2002-2006 PukiWiki Developers Team
 //   2001-2002 Originally written by yu-ji
@@ -138,7 +138,7 @@ function catbody($title, $page, $body)
                                '|' . '<[^>]*>' .                       // Ignore tags
                                '|' . '&[^;]+;' .                       // Ignore entities
                                '|' . '(' . $pattern . ')' .            // $matches[1]: Regex for a search word
-                               '/s';
+                               '/sS';
                        $decorate_Nth_word = create_function(
                                '$matches',
                                'return (isset($matches[1])) ? ' .