Last active
August 29, 2015 14:12
-
-
Save iforwms/3fee5ad892d208a555bc to your computer and use it in GitHub Desktop.
PHP: Escape HTML
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ESCAPE HTML CHRACTERS WHEN OUTPUTTING DATA FROM DB | |
function html_escape($raw_input) | |
{ | |
return htmlspecialchars($raw_input, ENT_QUOTES, 'UTF-8'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment