From 86e315e2b4f169680cafec58dab24f9e4ad1b0df Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Wed, 21 Feb 2001 08:25:21 +0000 Subject: - locale module: added documentation (first draft) - locale module: improved administration interface - headline module: fixed small visual glitch in export function - account: small improvements --- includes/function.inc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'includes/function.inc') diff --git a/includes/function.inc b/includes/function.inc index 44ec40baa..de5de07e6 100644 --- a/includes/function.inc +++ b/includes/function.inc @@ -2,6 +2,10 @@ $na = "na"; +function check_export($message) { + return strip_tags(str_replace("\"", """, stripslashes($message))); +} + function check_textfield($message) { return strip_tags(str_replace("\"", """, stripslashes($message))); } @@ -22,11 +26,8 @@ function check_code($message) { function check_output($message, $nl2br = 0) { global $allowed_html, $na; - if ($message) { - if ($nl2br == 1) return nl2br(strip_tags(stripslashes($message), $allowed_html)); - else return strip_tags(stripslashes($message), $allowed_html); - } - else return $na; + $var = strip_tags(stripslashes($message), $allowed_html); + return ($var) ? (($nl2br) ? nl2br($var) : $var) : $na; } function format_plural($count, $singular, $plural) { -- cgit v1.2.3