diff options
author | Dries Buytaert <dries@buytaert.net> | 2001-02-21 08:25:21 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2001-02-21 08:25:21 +0000 |
commit | 86e315e2b4f169680cafec58dab24f9e4ad1b0df (patch) | |
tree | 6781b55c81ff9e597b693f77d82ca2f2eb393bc8 /includes/function.inc | |
parent | 9b3cd99736ee9f8082af4398ae64dd0a132d7347 (diff) | |
download | brdo-86e315e2b4f169680cafec58dab24f9e4ad1b0df.tar.gz brdo-86e315e2b4f169680cafec58dab24f9e4ad1b0df.tar.bz2 |
- locale module: added documentation (first draft)
- locale module: improved administration interface
- headline module: fixed small visual glitch in export function
- account: small improvements
Diffstat (limited to 'includes/function.inc')
-rw-r--r-- | includes/function.inc | 11 |
1 files changed, 6 insertions, 5 deletions
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 = "<I>na</I>"; +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) { |