Index: apachesolr_search.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/apachesolr/apachesolr_search.module,v retrieving revision 1.1.2.6.2.119 diff -u -p -r1.1.2.6.2.119 apachesolr_search.module --- apachesolr_search.module 20 Nov 2009 17:19:05 -0000 1.1.2.6.2.119 +++ apachesolr_search.module 10 Dec 2009 01:57:39 -0000 @@ -231,8 +231,10 @@ function apachesolr_search_execute($keys $params['q.alt'] = implode(' ', $params['fq']); unset($params['fq']); } - - $response = $solr->search($query->get_query_basic(), $params['start'], $params['rows'], $params); + // @todo: remove htmlspecialchars() when the PHP library is fixed. + // We must run it here since converted entities are in the index. + // and thus bare entities &, > or < won't match. + $response = $solr->search(htmlspecialchars($query->get_query_basic(), ENT_NOQUOTES, 'UTF-8'), $params['start'], $params['rows'], $params); // The response is cached so that it is accessible to the blocks and anything // else that needs it beyond the initial search. apachesolr_static_response_cache($response); @@ -421,7 +423,10 @@ function apachesolr_process_response($re $results[] = array( 'link' => url($doc->path), 'type' => apachesolr_search_get_type($doc->type), - 'title' => $doc->title, + // The PHP library encodes entities when indexing, but + // template_preprocess_search_result() runs check_plain() on the title + // again. Decode to correc tthe display. + 'title' => htmlspecialchars_decode($doc->title, ENT_QUOTES), 'user' => theme('username', $doc), 'date' => $doc->created, 'node' => $doc,