Index: trunk/extensions/SemanticForms/includes/SF_FormInputs.inc |
— | — | @@ -73,9 +73,9 @@ |
74 | 74 | if ($other_args['field_type'] == 'integer') { |
75 | 75 | $size = 10; |
76 | 76 | $validation_type_str = 'integer'; |
77 | | - } elseif ($other_args['field_type'] == 'float') { |
| 77 | + } elseif ($other_args['field_type'] == 'number') { |
78 | 78 | $size = 10; |
79 | | - $validation_type_str = 'float'; |
| 79 | + $validation_type_str = 'number'; |
80 | 80 | } elseif ($other_args['field_type'] == 'URL') { |
81 | 81 | $size = 100; |
82 | 82 | $validation_type_str = 'URL'; |
— | — | @@ -95,7 +95,8 @@ |
96 | 96 | } else { |
97 | 97 | $size = 35; |
98 | 98 | } |
99 | | - $cur_value = htmlspecialchars($cur_value); |
| 99 | + if (! is_null($cur_value)) |
| 100 | + $cur_value = htmlspecialchars($cur_value); |
100 | 101 | |
101 | 102 | $text =<<<END |
102 | 103 | <input id="$input_id" tabindex="$sfgTabIndex" class="$className" name="$input_name" type="text" |
— | — | @@ -413,6 +414,7 @@ |
414 | 415 | $js_call = ""; |
415 | 416 | } |
416 | 417 | |
| 418 | + $cur_value = htmlspecialchars($cur_value); |
417 | 419 | $text =<<<END |
418 | 420 | <textarea tabindex="$sfgTabIndex" id="$input_id" name="$input_name" rows="$rows" cols="$cols" class="$className" $disabled_text $js_call>$cur_value</textarea> |
419 | 421 | <span id="$info_id" class="errorMessage"></span> |