Reputation: 4808
I used Sanitize::clean in cakePHP to sanitize user input and in result I got "\r" character.
Upvotes: 0
Views: 1369
Reputation: 28215
You can get rid of this character (and others) by calling trim($userInput);
or this way using Sanitize::clean
:
$opts = array('carriage'=>true);
$cleaned = Sanitize::clean($userInput,$opts);
Upvotes: 1
Reputation: 150138
"\r" is the Carriage Return character (when printing to the console, it causes output to start on the next line but does not affect display of web pages).
Upvotes: 1