10月
23
2007
Joomla! 1.0.13JP バグ(検索の文字化け)
クライアントから苦情がっ!Joomla!のデフォルトの検索窓から日本語を7文字以上いれて検索すると文字化けすると言われ、確認すると確かに文字化けしますね。ちょっとJoomla!のファイルを変更してみました。
フロントエンド/components/com_search/search.phpの77~~87行目あたり。
// limit searchword to 20 characters
if ( strlen( $searchword ) > 20 ) {
$searchword = substr( $searchword, 0, 19 );
$restriction = 1;
}
// searchword must contain a minimum of 3 characters
if ( $searchword && strlen( $searchword ) < 3 ) {
$searchword = '';
$restriction = 1;
}
を
// limit searchword to 20 characters
if ( mb_strlen( $searchword ) > 20 ) {
$searchword = mb_substr( $searchword, 0, 19 );
$restriction = 1;
}
// searchword must contain a minimum of 3 characters
if ( $searchword && mb_strlen( $searchword ) < 3 ) {
$searchword = '';
$restriction = 1;
}
に変更しました。




































