X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=encode.php;h=63ff5ce60f94aac1a0e04d05bf00afcc4d388e05;hb=3faf64c6a1e0cbd4f880da951775c41fb8a6f0ab;hp=db0cde348dbcca0c48895bb1f067a3e1ae28e2ff;hpb=856f805c6cbb6e712c662214f3b5821442f808a0;p=wfpl.git
diff --git a/encode.php b/encode.php
index db0cde3..63ff5ce 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: