From 48805cdb3501fc558a68a31f2aed2f6ad716e297 Mon Sep 17 00:00:00 2001 From: Jason Woofenden Date: Fri, 14 Sep 2007 01:17:35 -0400 Subject: [PATCH] file_run() expects _main suffix. added: enc_htmlbr enc_provinces --- encode.php | 23 +++++++++++++++++++++++ file_run.php | 13 ++++++++----- 2 files changed, 31 insertions(+), 5 deletions(-) diff --git a/encode.php b/encode.php index 243b21f..1cbac74 100644 --- a/encode.php +++ b/encode.php @@ -51,6 +51,18 @@ function enc_html($str) { } +# Encode for output in html. Converts newlines to
+# +# Example:

~foo.html~

+function enc_htmlbr($str) { + $str = str_replace('&', '&', $str); + $str = str_replace('<', '<', $str); + $str = str_replace('>', '>', $str); + $str = str_replace("\n", "
\n", $str); + return $str; +} + + # HTML attribute. # # Example: @@ -108,6 +120,17 @@ function enc_states($str) { return encode_options($str, $states_assoc, $use_keys = true); } +# display