/** * Strips out quotes, and optionally * @see WikiaSearchConfigTest::testQueryAndNamespaceMethods * @param boolean $raw * @return string */ public function getQueryNoQuotes($raw = false) { $query = preg_replace("/['\"]/", '', preg_replace("/(\\w)['\"](\\w)/", '$1 $2', $this->getQuery(self::QUERY_RAW))); return $raw ? $query : WikiaSearch::sanitizeQuery($query); }