Index: class.ux_t3lib_sqlparser.php =================================================================== --- class.ux_t3lib_sqlparser.php (revision 28079) +++ class.ux_t3lib_sqlparser.php (working copy) @@ -59,6 +59,18 @@ // TODO: Handle SQL hints in comments according to current DBMS return parent::compileFieldList($selectFields, FALSE); } + + /** + * Add slashes function used for compiling queries + * This method overrides the method from t3lib_sqlparser because + * the input string is already properly escaped. + * + * @param string Input string + * @return string Output string + */ + protected function compileAddslashes($str) { + return $str; + } /************************* * Index: tests/sqlparser_general_testcase.php =================================================================== --- tests/sqlparser_general_testcase.php (revision 28079) +++ tests/sqlparser_general_testcase.php (working copy) @@ -117,18 +117,43 @@ /** * @test + * @see http://bugs.typo3.org/view.php?id=13104 */ public function canGetStringValue() { - $parseString = '"some owner\\\' string"'; + $parseString = '"some owner\\\'s string"'; $value = $this->fixture->_callRef('getValue', $parseString); - $expected = array('some owner\' string', '"'); + $expected = array('some owner\'s string', '"'); $this->assertEquals($expected, $value); } /** * @test + * @see http://bugs.typo3.org/view.php?id=13104 */ + public function canGetStringValueWithSingleQuote() { + $parseString = "'some owner\'s string'"; + $value = $this->fixture->_callRef('getValue', $parseString); + $expected = array('some owner\'s string', "'"); + + $this->assertEquals($expected, $value); + } + + /** + * @test + * @see http://bugs.typo3.org/view.php?id=13104 + */ + public function canGetStringValueWithDoubleQuote() { + $parseString = '"the \"owner\" is here"'; + $value = $this->fixture->_callRef('getValue', $parseString); + $expected = array('the "owner" is here', '"'); + + $this->assertEquals($expected, $value); + } + + /** + * @test + */ public function canGetListOfValues() { $parseString = '( 1, 2, 3 ,4)'; $operator = 'IN';