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 .= '"';
list($a, $b, $c, $src, $width, $height) = explode(' ', $str);
return $height;
}
+
+# example template: Length: ~length.html~ day~length.s~
+function enc_s($str) {
+ if($str == '1') {
+ return '';
+ }
+
+ return 's';
+}