--- a/trunk/web/sys/SearchObject/Solr.php
+++ b/trunk/web/sys/SearchObject/Solr.php
@@ -1541,8 +1541,8 @@
         } else {
             $lookfor = $this->displayQuery();
         }
-        // Workaround for apostrophe between quotes breaking XSLT:
-        if (preg_match("/\"*\'*\"/", $lookfor) > 0) {
+        // Workaround for apostrophes and quotes in the same parameter breaking XSLT:
+        if (strstr($lookfor, '"') !== false && strstr($lookfor, "'") !== false) {
             $lookfor = str_replace("'", "", $lookfor);
         }
         if (count($this->filterList) > 0) {