X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=encode.php;h=175e1a757a4273bdda998eb4f22baefafc85abac;hb=875b7f185d9c3c4bbf896c41456e3f8ccdde905e;hp=b29cd091646b4b43086ac81ce2a4f73fe23c4c5a;hpb=1b3ef2591aad28325486101883dd7c8a22d56670;p=wfpl.git diff --git a/encode.php b/encode.php index b29cd09..175e1a7 100644 --- a/encode.php +++ b/encode.php @@ -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. # @@ -237,7 +246,7 @@ function encode_options($selected, $options, $keys_from) { $out .= '>'; - $out .= enc_html($display); + $out .= enc_htmlnbsp($display); $out .= "\n"; }