Using the Japanese on the slug will result in a malfunction in the search result
-
The search query is not properly escaped, so the correct search results are not displayed.
search-everything.php => line: 637
$term = $wpdb->prepare("%s", $exact ? $term : "%". sanitize_title_with_dashes($term) . "%");
search-everything.php => line: 642
$term = $wpdb->prepare("%s", $exact ? $term : "%". sanitize_title_with_dashes($s) . "%");
Example of results:
(tter.slug LIKE '%%e3%83%aa%e3%83%95%e3%83%88%')
Please escape as follows.
$t = sanitize_title_with_dashes($term); $term = $wpdb->prepare("%s", $exact ? $term : "%". $wpdb->esc_like($t) . "%");
Results:
(tter.slug LIKE '%\\%e3\\%83\\%aa\\%e3\\%83\\%95\\%e3\\%83\\%88%')
- The topic ‘Using the Japanese on the slug will result in a malfunction in the search result’ is closed to new replies.