Created
February 11, 2015 18:50
-
-
Save grappler/5646b6a015d220335807 to your computer and use it in GitHub Desktop.
Escaping for textarea values while leaving both double and single quotes unconverted.
This file contains hidden or 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
<?php | |
/** | |
* Escaping for textarea values while leaving both double and single quotes unconverted. | |
* | |
* @param string $text | |
* @return string | |
*/ | |
function theme_slug_esc_text( $text ) { | |
return htmlspecialchars( $text, ENT_NOQUOTES, get_option( 'blog_charset' ) ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment