Open unstoppablecarl opened 12 years ago
how do you unescape strings and remove the linebreaking characters? using the unescape() method doesn't do anything to strings.
$db = fORMDatabase::retrieve();
$testString = 'foo bar'; $escaped = $db->escape('string', $testString); echo $escaped; // 'foo\n\n\n bar' // unescaping strings doesn't do anything to the string $unescaped = $db->unescape('string', $escaped); echo $unescaped; // 'foo\n\n\n bar'
the issue seems to be that $db->escape('string', $value); isn't the same as $db->query(' %s', $value);
$db->escape('string', $value) doesn't give proper line breaks and $db->query(' %s', $value); does
how do you unescape strings and remove the linebreaking characters? using the unescape() method doesn't do anything to strings.
$db = fORMDatabase::retrieve();