return $str;
}
+# Encode for output in html. Spaces converted to and \n to <br />
+#
+# Example: <option value="12">~foo.htmlbrnbsp~</option>
+function enc_htmlbrnbsp($str) {
+ $str = enc_htmlbr($str);
+ $str = str_replace(' ', ' ', $str);
+ return $str;
+}
+
# Encode for output in html. Spaces converted to
#
# Example: <option value="12">~foo.htmlnbsp~</option>
$out .= ' selected="selected"';
}
- if($value !== $display) {
+ if($value !== $display || strpos($value, ' ') !== false) {
$out .= ' value="';
$out .= enc_attr($value);
$out .= '"';