diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc index 9d3e44cd0c1f..2a0f7e52de47 100644 --- a/includes/bootstrap.inc +++ b/includes/bootstrap.inc @@ -707,9 +707,15 @@ function arg($index) { } } +/** + * Encode special characters in a plain-text string for display as HTML. + */ +function check_plain($text) { + return htmlspecialchars($text, ENT_QUOTES); +} + /** * Prepare a URL for use in an HTML attribute. Strips harmful protocols. - * */ function check_url($uri) { $uri = htmlspecialchars($uri, ENT_QUOTES);