Nov
27
2013
27
2013
Clean sanitized database contents on output
A snippet by admin
No Comments
/**
* Function to clean data for nice output
*
* @access public
* @param string
* @return string
*/
function clean( $text )
{
return stripslashes( html_entity_decode( nl2br( $text ) ) );
}
Leave a comment
Recent Snippets
- htaccess : Only allow access to specific wordpress upload types if logged in
- MySQL : Query WordPress Database for Invalid Media Filenames
- PHP : Get Actual IP Address with PHP
- JavaScript : Allow Tab in Textarea
- PHP : Clean sanitized database contents on output
- htaccess : Force www. prefix in URIs
- PHP : Force File Download with Correct Content Type
- Wordpress : Disable upgrade notification