Fixing bad UTF-8.
parent
4fa64b57c2
commit
d13943e245
|
|
@ -409,7 +409,7 @@ function search_index($sid, $type, $text) {
|
|||
function do_search($keys, $type, $join = '', $where = '1') {
|
||||
// Note, we replace the wildcards with U+FFFD (Replacement character) to pass
|
||||
// through the keyword extractor.
|
||||
$keys = str_replace('*', '�', $keys);
|
||||
$keys = str_replace('*', '<EFBFBD>', $keys);
|
||||
|
||||
// Split into words
|
||||
$keys = search_keywords_split($keys);
|
||||
|
|
@ -425,9 +425,9 @@ function do_search($keys, $type, $join = '', $where = '1') {
|
|||
if (string_length($word) < variable_get('remove_short', 3)) {
|
||||
continue;
|
||||
}
|
||||
if (strpos($word, '�') !== false) {
|
||||
if (strpos($word, '<EFBFBD>') !== false) {
|
||||
$words[] = "i.word LIKE '%s'";
|
||||
$arguments[] = str_replace('�', '%', $word);
|
||||
$arguments[] = str_replace('<EFBFBD>', '%', $word);
|
||||
}
|
||||
else {
|
||||
$words[] = "i.word = '%s'";
|
||||
|
|
|
|||
|
|
@ -409,7 +409,7 @@ function search_index($sid, $type, $text) {
|
|||
function do_search($keys, $type, $join = '', $where = '1') {
|
||||
// Note, we replace the wildcards with U+FFFD (Replacement character) to pass
|
||||
// through the keyword extractor.
|
||||
$keys = str_replace('*', '�', $keys);
|
||||
$keys = str_replace('*', '<EFBFBD>', $keys);
|
||||
|
||||
// Split into words
|
||||
$keys = search_keywords_split($keys);
|
||||
|
|
@ -425,9 +425,9 @@ function do_search($keys, $type, $join = '', $where = '1') {
|
|||
if (string_length($word) < variable_get('remove_short', 3)) {
|
||||
continue;
|
||||
}
|
||||
if (strpos($word, '�') !== false) {
|
||||
if (strpos($word, '<EFBFBD>') !== false) {
|
||||
$words[] = "i.word LIKE '%s'";
|
||||
$arguments[] = str_replace('�', '%', $word);
|
||||
$arguments[] = str_replace('<EFBFBD>', '%', $word);
|
||||
}
|
||||
else {
|
||||
$words[] = "i.word = '%s'";
|
||||
|
|
|
|||
Loading…
Reference in New Issue