Skip to content
Snippets Groups Projects
Commit d13943e2 authored by Steven Wittens's avatar Steven Wittens
Browse files

Fixing bad UTF-8.

parent 4fa64b57
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -409,7 +409,7 @@ function search_index($sid, $type, $text) { ...@@ -409,7 +409,7 @@ function search_index($sid, $type, $text) {
function do_search($keys, $type, $join = '', $where = '1') { function do_search($keys, $type, $join = '', $where = '1') {
// Note, we replace the wildcards with U+FFFD (Replacement character) to pass // Note, we replace the wildcards with U+FFFD (Replacement character) to pass
// through the keyword extractor. // through the keyword extractor.
$keys = str_replace('*', '�', $keys); $keys = str_replace('*', '', $keys);
// Split into words // Split into words
$keys = search_keywords_split($keys); $keys = search_keywords_split($keys);
...@@ -425,9 +425,9 @@ function do_search($keys, $type, $join = '', $where = '1') { ...@@ -425,9 +425,9 @@ function do_search($keys, $type, $join = '', $where = '1') {
if (string_length($word) < variable_get('remove_short', 3)) { if (string_length($word) < variable_get('remove_short', 3)) {
continue; continue;
} }
if (strpos($word, '�') !== false) { if (strpos($word, '') !== false) {
$words[] = "i.word LIKE '%s'"; $words[] = "i.word LIKE '%s'";
$arguments[] = str_replace('�', '%', $word); $arguments[] = str_replace('', '%', $word);
} }
else { else {
$words[] = "i.word = '%s'"; $words[] = "i.word = '%s'";
......
...@@ -409,7 +409,7 @@ function search_index($sid, $type, $text) { ...@@ -409,7 +409,7 @@ function search_index($sid, $type, $text) {
function do_search($keys, $type, $join = '', $where = '1') { function do_search($keys, $type, $join = '', $where = '1') {
// Note, we replace the wildcards with U+FFFD (Replacement character) to pass // Note, we replace the wildcards with U+FFFD (Replacement character) to pass
// through the keyword extractor. // through the keyword extractor.
$keys = str_replace('*', '�', $keys); $keys = str_replace('*', '', $keys);
// Split into words // Split into words
$keys = search_keywords_split($keys); $keys = search_keywords_split($keys);
...@@ -425,9 +425,9 @@ function do_search($keys, $type, $join = '', $where = '1') { ...@@ -425,9 +425,9 @@ function do_search($keys, $type, $join = '', $where = '1') {
if (string_length($word) < variable_get('remove_short', 3)) { if (string_length($word) < variable_get('remove_short', 3)) {
continue; continue;
} }
if (strpos($word, '�') !== false) { if (strpos($word, '') !== false) {
$words[] = "i.word LIKE '%s'"; $words[] = "i.word LIKE '%s'";
$arguments[] = str_replace('�', '%', $word); $arguments[] = str_replace('', '%', $word);
} }
else { else {
$words[] = "i.word = '%s'"; $words[] = "i.word = '%s'";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment