Index: apachesolr.index.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/apachesolr/apachesolr.index.inc,v
retrieving revision 1.1.2.4
diff -u -p -r1.1.2.4 apachesolr.index.inc
--- apachesolr.index.inc	30 Apr 2009 17:38:40 -0000	1.1.2.4
+++ apachesolr.index.inc	17 May 2009 00:47:18 -0000
@@ -32,10 +32,21 @@ function apachesolr_clean_text($text) {
 }
 
 function _apachesolr_strip_decode($text) {
+  static $lt_5_2_3;
+
+  // The 4th param was added to htmlspecialchars() in PHP 5.2.3
+  if (!isset($lt_5_2_3)) {
+    $lt_5_2_3 = version_compare(phpversion(), '5.2.3') < 0; 
+  }
   // Add spaces before stripping tags to avoid running words together.
   $text = filter_xss(str_replace(array('<', '>'), array(' <', '> '), $text), array());
   // Decode entities and then make safe any < or > characters.
-  return htmlspecialchars(html_entity_decode($text, ENT_NOQUOTES, 'UTF-8'), ENT_NOQUOTES, 'UTF-8', FALSE);
+  if ($lt_5_2_3) {
+    return htmlspecialchars(html_entity_decode($text, ENT_NOQUOTES, 'UTF-8'), ENT_NOQUOTES, 'UTF-8');
+  }
+  else {
+    return htmlspecialchars(html_entity_decode($text, ENT_NOQUOTES, 'UTF-8'), ENT_NOQUOTES, 'UTF-8', FALSE);
+  }
 }
 
 /**
