Index: CHANGELOG.txt
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/apachesolr/CHANGELOG.txt,v
retrieving revision 1.1.2.112.2.29
diff -u -p -r1.1.2.112.2.29 CHANGELOG.txt
--- CHANGELOG.txt	22 Jan 2010 16:42:06 -0000	1.1.2.112.2.29
+++ CHANGELOG.txt	22 Jan 2010 17:04:24 -0000
@@ -1,10 +1,11 @@
-// $Id: CHANGELOG.txt,v 1.1.2.112.2.29 2010/01/22 16:42:06 claudiucristea Exp $
+// $Id: CHANGELOG.txt,v 1.1.2.112.2.24 2010/01/21 14:53:49 claudiucristea Exp $
 
 Apache Solr Search Integration x.x-x.x, xxxx-xx-xx
 ------------------------------
 
 Apache Solr Search Integration 5.x-2.x, 2010-xx-xx
 ------------------------------
+#528086 by pwolanin, better (but still problematic) handling of entities.
 #662232 by pwolanin, index zxx as the Language neutral code.
 #401234 by mkalkbrenner, janusman, and pwolanin, reflect hierarchical taxonomy vocabulary in facets.
 #650534 by Scott Reynolds, don't use c.last_comment_timestamp unless comment module enabled.
Index: apachesolr_search.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/apachesolr/apachesolr_search.module,v
retrieving revision 1.1.2.6.2.111.4.16
diff -u -p -r1.1.2.6.2.111.4.16 apachesolr_search.module
--- apachesolr_search.module	22 Jan 2010 16:42:06 -0000	1.1.2.6.2.111.4.16
+++ apachesolr_search.module	22 Jan 2010 17:04:24 -0000
@@ -1,5 +1,5 @@
 <?php
-// $Id: apachesolr_search.module,v 1.1.2.6.2.111.4.16 2010/01/22 16:42:06 claudiucristea Exp $
+// $Id: apachesolr_search.module,v 1.1.2.6.2.111.4.13 2010/01/21 14:55:38 claudiucristea Exp $
 
 /**
  * @file
@@ -250,7 +250,9 @@ function apachesolr_search_execute($keys
     unset($params['fq']);
   }
 
-  $response = $solr->search($query->get_query_basic(), $params['start'], $params['rows'], $params);
+  // We must run htmlspecialchars() 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);
@@ -443,7 +445,9 @@ function apachesolr_process_response($re
       $results[] = array(
         'link' => url($doc->path),
         'type' => apachesolr_search_get_type($doc->type),
-        'title' => $doc->title,
+        // template_preprocess_search_result() runs check_plain() on the title
+        // again.  Decode to correct the display.
+        'title' => htmlspecialchars_decode($doc->title, ENT_QUOTES),
         'user' => theme('username', $doc),
         'date' => $doc->created,
         'node' => $doc,
