JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
FIXED format_decimal(), and format_dollars/money()
[wfpl.git] / encode.php
index cd1e0b4..63ff5ce 100644 (file)
@@ -71,6 +71,15 @@ function enc_htmlbrtab($str) {
        return $str;
 }
 
+# Encode for output in html. Spaces converted to &nbsp; and \n to <br />
+#
+# Example: <option value="12">~foo.htmlbrnbsp~</option>
+function enc_htmlbrnbsp($str) {
+       $str = enc_htmlbr($str);
+       $str = str_replace(' ', '&nbsp;', $str);
+       return $str;
+}
+
 # Encode for output in html. Spaces converted to &nbsp;
 #
 # Example: <option value="12">~foo.htmlnbsp~</option>