• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Keine Tags

Frequently used words (click to add to your profile)

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

Commit MetaInfo

Revision7c4201befb0a5e78793159a7994183ea3912d917 (tree)
Zeit2017-09-30 10:44:00
Autorumorigu <umorigu@gmai...>
Commiterumorigu

Log Message

Fix encode_hint logic

Ändern Zusammenfassung

Diff

--- a/plugin/search2.inc.php
+++ b/plugin/search2.inc.php
@@ -166,7 +166,7 @@ function plugin_search2_do_search($query_text, $base, $start_index)
166166 mb_convert_variables('UTF-8', SOURCE_ENCODING, $obj);
167167 }
168168 }
169- print(json_encode(obj, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES));
169+ print(json_encode($obj, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES));
170170 }
171171
172172 function plugin_search2_search_form($s_word = '', $type = '', $bases = array())
--- a/skin/search2.js
+++ b/skin/search2.js
@@ -28,7 +28,7 @@ window.addEventListener && window.addEventListener('DOMContentLoaded', function(
2828 function doSearch(searchText, session, startIndex) {
2929 var url = './?cmd=search2&action=query';
3030 var props = getSiteProps();
31- url += '&encode_hint=\u3077';
31+ url += '&encode_hint=' + encodeURIComponent('\u3077');
3232 if (searchText) {
3333 url += '&q=' + encodeURIComponent(searchText);
3434 }
@@ -451,7 +451,8 @@ window.addEventListener && window.addEventListener('DOMContentLoaded', function(
451451 baseUri = props.base_uri_pathname;
452452 }
453453 var url = baseUri + '?' +
454- (props.is_utf8 ? '' : 'encode_hint=\u3077' + '&') +
454+ (props.is_utf8 ? '' : 'encode_hint=' +
455+ encodeURIComponent('\u3077') + '&') +
455456 'cmd=search2' +
456457 '&q=' + encodeSearchText(q) +
457458 (base ? '&base=' + encodeURIComponent(base) : '');