From f4799d1ce9bcaca7f85d3dca6b772b597cafcb07 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Tue, 29 Nov 2005 20:37:19 +0000 Subject: [PATCH] - check_plain() missed its train. --- includes/bootstrap.inc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc index 9d3e44cd0c1..2a0f7e52de4 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);