X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=encode.php;h=6afcd41432ddc309afd5b07ad0ea27ebee482065;hb=8c71421d162931a6d022b5208bffdc0c1b333769;hp=db0cde348dbcca0c48895bb1f067a3e1ae28e2ff;hpb=856f805c6cbb6e712c662214f3b5821442f808a0;p=wfpl.git
diff --git a/encode.php b/encode.php
index db0cde3..6afcd41 100644
--- a/encode.php
+++ b/encode.php
@@ -23,6 +23,10 @@
# will encode foo (using enc_html()) before displaying it, so that characters
# such as < will display properly.
+function enc_cap($str) {
+ $str = ucfirst($str);
+ return $str;
+}
function enc_jsdq($str) {
$str = enc_sql($str);
@@ -49,13 +53,33 @@ function enc_html($str) {
# Encode for output in html. Convert newlines to
#
-# Example:
~foo.html~
+# Example:
~foo.htmlbr~
function enc_htmlbr($str) {
$str = enc_html($str);
$str = str_replace("\n", " \n", $str);
return $str;
}
+# Encode for output in html. Preserves newlines and indentation by converting
+# newlines to and spaces at the begining of lines to
+#
+# Example: