? SolrPhpClient
Index: apachesolr.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/apachesolr/apachesolr.module,v
retrieving revision 1.1.2.12.2.155.2.114
diff -u -p -r1.1.2.12.2.155.2.114 apachesolr.module
--- apachesolr.module	4 Sep 2010 12:07:15 -0000	1.1.2.12.2.155.2.114
+++ apachesolr.module	7 Sep 2010 19:31:25 -0000
@@ -20,7 +20,7 @@ function apachesolr_init() {
     set_include_path(dirname(__FILE__) . PATH_SEPARATOR . get_include_path());
     require_once 'Zend/Json/Decoder.php';
     require_once 'Zend/Json/Encoder.php';
-  
+
     /**
      * Substitute for missing PHP built-in functions.
      */
@@ -2258,6 +2258,9 @@ function apachesolr_l($text, $path, $opt
   $get = array_diff_key($_GET, array('q' => 1, 'page' => 1), $options['query'], $query->get_url_queryvalues());
   $options['query'] += $get;
 
+  // Decode html entities before sending through check_plain
+  $text = html_entity_decode($text);
+
   return '<a href="'. check_url(url($path, $options)) .'"'. drupal_attributes($options['attributes']) .'>'. ($options['html'] ? $text : check_plain($text)) .'</a>';
 }
 
@@ -2290,6 +2293,9 @@ function apachesolr_js() {
 function theme_apachesolr_unclick_link($facet_text, $path, $options = array()) {
   apachesolr_js();
   if (empty($options['html'])) {
+    // Decode html entities in $facet_text before running through check_plain().
+    // This helps to avoid double encoded apersands.
+    $facet_text = html_entity_decode($facet_text);
     $facet_text = check_plain($facet_text);
   }
   else {
