• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revisione9d8b6939d29f8f820ea6b7edb7c22e50a419085 (tree)
Time2022-03-22 00:30:32
Authorumorigu <umorigu@gmai...>
Commiterumorigu

Log Message

BugTrack/746 search2: Zenkaku space as search keywords delimiter

Change Summary

Incremental Difference

--- a/plugin/search2.inc.php
+++ b/plugin/search2.inc.php
@@ -1,7 +1,7 @@
11 <?php
22 // PukiWiki - Yet another WikiWikiWeb clone.
33 // search2.inc.php
4-// Copyright 2017-2021 PukiWiki Development Team
4+// Copyright 2017-2022 PukiWiki Development Team
55 // License: GPL v2 or (at your option) any later version
66 //
77 // Search2 plugin - Show detail result using JavaScript
@@ -41,9 +41,14 @@ function plugin_search2_action()
4141 'body' => "<br>" . $_msg_searching . "\n" .
4242 plugin_search2_search_form($q, $bases, $offset));
4343 } else {
44- $msg = str_replace('$1', htmlsc($q), $_title_result);
44+ $q2 = $q;
45+ if (defined('PKWK_UTF8_ENABLE')) {
46+ $zen_space = "\xE3\x80\x80"; // IDEOGRAPHIC SPACE in UTF-8 - &#x3000;
47+ $q2 = str_replace($zen_space, ' ', $q);
48+ }
49+ $msg = str_replace('$1', htmlsc($q2), $_title_result);
4550 return array('msg' => $msg,
46- 'body' => plugin_search2_search_form($q, $bases, $offset, $prev_offset_s));
51+ 'body' => plugin_search2_search_form($q2, $bases, $offset, $prev_offset_s));
4752 }
4853 } else if ($action === 'query') {
4954 $q = isset($vars['q']) ? $vars['q'] : '';