Index: t3lib/class.t3lib_db.php =================================================================== --- t3lib/class.t3lib_db.php (revision 8084) +++ t3lib/class.t3lib_db.php (working copy) @@ -658,7 +658,7 @@ $queryParts = array(); foreach($searchWords as $sw) { - $like = ' LIKE \'%' . $this->quoteStr($sw, $table) . '%\''; + $like = ' LIKE \'%' . $this->escapeStrForLike($this->quoteStr($sw, $table), $table) . '%\''; $queryParts[] = $table . '.' . implode($like . ' OR ' . $table . '.', $fields) . $like; } $query = '(' . implode(') AND (', $queryParts) . ')'; Index: typo3/class.db_list.inc =================================================================== --- typo3/class.db_list.inc (revision 8084) +++ typo3/class.db_list.inc (working copy) @@ -572,11 +572,8 @@ // If search-fields were defined (and there always are) we create the query: if (count($sfields)) { - $like = ' LIKE \'%'.$GLOBALS['TYPO3_DB']->quoteStr($this->searchString, $table).'%\''; // Free-text searching... - $queryPart = ' AND ('.implode($like.' OR ',$sfields).$like.')'; - // Return query: - return $queryPart; + return ' AND ' . $GLOBALS['TYPO3_DB']->searchQuery(array($this->searchString), $sfields, $table); } } }