<?php
// PukiWiki - Yet another WikiWikiWeb clone.
-// $Id: func.php,v 1.54 2006/04/10 14:44:07 henoheno Exp $
+// $Id: func.php,v 1.55 2006/04/14 05:18:31 teanan Exp $
// Copyright (C)
// 2002-2005 PukiWiki Developers Team
// 2001-2002 Originally written by yu-ji
$or = array(preg_quote($do_escape ? htmlspecialchars($char) : $char, $quote));
if (strlen($char) == 1) {
// An ASCII (single-byte) character
- foreach (array(strtoupper($char), strtolower($char)) as $_char) {
- if ($char != '&') $or[] = preg_quote($_char, $quote); // As-is?
- $ascii = ord($_char);
- $or[] = sprintf('&#(?:%d|x%x);', $ascii, $ascii); // As an entity reference?
- $or[] = preg_quote($mb_convert_kana($_char, 'A'), $quote); // As Zenkaku?
- }
+ if ($char != '&') $or[] = preg_quote($char, $quote); // As-is?
+ $ascii = ord($char);
+ $or[] = sprintf('&#(?:%d|x%x);', $ascii, $ascii); // As an entity reference?
+ $or[] = preg_quote($mb_convert_kana($char, 'A'), $quote); // As Zenkaku?
} else {
// NEVER COME HERE with mb_substr(string, start, length, 'ASCII')
// A multi-byte character
array_unshift($source, $page); // ¥Ú¡¼¥¸Ì¾¤â¸¡º÷ÂоݤË
$b_match = FALSE;
+ $haystack = join('', $source);
foreach ($keys as $key) {
- $tmp = preg_grep('/' . $key . '/', $source);
- $b_match = ! empty($tmp);
+ $b_match = preg_match('/' . $key . '/i', $haystack);
if ($b_match xor $b_type) break;
}
if ($b_match) $pages[$page] = get_filetime($page);
<?php
// PukiWiki - Yet another WikiWikiWeb clone.
-// $Id: html.php,v 1.54 2006/04/12 14:37:21 henoheno Exp $
+// $Id: html.php,v 1.55 2006/04/14 05:18:31 teanan Exp $
// Copyright (C)
// 2002-2006 PukiWiki Developers Team
// 2001-2002 Originally written by yu-ji
'|' . '<[^>]*>' . // Ignore tags
'|' . '&[^;]+;' . // Ignore entities
'|' . '(' . $pattern . ')' . // $matches[1]: Regex for a search word
- '/s';
+ '/is';
$decorate_Nth_word = create_function(
'$matches',
'return (isset($matches[1])) ? ' .