X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=encode.php;h=b73a0ecb430fb9f5577b5dabd66859c0bff2cc89;hb=aabefb2d3bb9a63b67eacc3c8a6d55139ee8e6b8;hp=123fcc9c47af4b0b45b89a1dc2257f52e7e38d0b;hpb=6c27f346217f7b4b8b24064371f2461cf57c6167;p=wfpl.git
diff --git a/encode.php b/encode.php
index 123fcc9..b73a0ec 100644
--- a/encode.php
+++ b/encode.php
@@ -50,7 +50,7 @@ function enc_html($str) {
return $str;
}
-# Encode for output in html. converts \n to
+# Encode for output in html. Convert newlines to
#
# Example:
~foo.html~
function enc_htmlbr($str) {
@@ -59,6 +59,15 @@ function enc_htmlbr($str) {
return $str;
}
+# Encode for output in html. Spaces converted to
+#
+# Example:
+function enc_htmlnbsp($str) {
+ $str = enc_html($str);
+ $str = str_replace(' ', ' ', $str);
+ return $str;
+}
+
# HTML attribute.
#
@@ -121,38 +130,31 @@ function enc_ddmmyyyyhhmm($seconds) {
}
-# display