Index: trunk/extensions/SemanticForms/includes/SF_FormPrinter.php |
— | — | @@ -794,18 +794,20 @@ |
795 | 795 | if ( isset( $template_instance_query_values ) && |
796 | 796 | $template_instance_query_values != null && |
797 | 797 | is_array( $template_instance_query_values ) ) { |
798 | | - // If the field name contains an |
799 | | - // apostrophe, the array sometimes |
800 | | - // has the apostrophe escaped, and |
801 | | - // sometimes not. For now, just check |
802 | | - // for both versions. |
803 | | - // @TODO - figure this out. |
804 | | - $field_query_val = null; |
805 | | - if ( array_key_exists( $escaped_field_name, $template_instance_query_values ) ) { |
806 | | - $field_query_val = $template_instance_query_values[$escaped_field_name]; |
807 | | - } elseif ( array_key_exists( $field_name, $template_instance_query_values ) ) { |
808 | | - $field_query_val = $template_instance_query_values[$field_name]; |
809 | | - } |
| 798 | + // If the field name contains an |
| 799 | + // apostrophe, the array sometimes |
| 800 | + // has the apostrophe escaped, and |
| 801 | + // sometimes not. For now, just check |
| 802 | + // for both versions. |
| 803 | + // @TODO - figure this out. |
| 804 | + $field_query_val = null; |
| 805 | + if ( array_key_exists( $escaped_field_name, $template_instance_query_values ) ) { |
| 806 | + $field_query_val = $template_instance_query_values[$escaped_field_name]; |
| 807 | + } elseif ( array_key_exists( $field_name, $template_instance_query_values ) ) { |
| 808 | + $field_query_val = $template_instance_query_values[$field_name]; |
| 809 | + } |
| 810 | + // Escaping of quotes is necessary. |
| 811 | + $field_query_val = htmlentities( $field_query_val ); |
810 | 812 | if ( $form_submitted || ( ! empty( $field_query_val ) && ! is_array( $field_query_val ) ) ) { |
811 | 813 | $cur_value = $field_query_val; |
812 | 814 | } |