reenadak icon

Unsanitize Input

reenadak | PRO | 02/20/18 07:05:49 PM UTC | 0 ⭐ | 378 👁️ | Never ⏰ | []
PHP |

390 B

|

None

|

0 👍

/

0 👎

    /*
    - Unsanitize Input
    - Strips slashes from the input (eg. turns dog\'s into dog's)
    
    $string     - The string you want to unsanitize.
    $multiline  - Turns \n into HTML <br />
    */
    
    public function unsanitizeInput($string, $multiline = false) {
        
        if ($multiline)
            $string = nl2br(stripslashes($string));
        else
            $string = stripslashes($string);
        
        return $string;
        
    }

Comments