diff --git a/.buildpath b/.buildpath
deleted file mode 100644
index 8bcb4b5..0000000
--- a/.buildpath
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..2c861df
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,7 @@
+# Eclipse
+/.buildpath
+/.project
+/.settings
+
+# Node.js
+/node_modules/
diff --git a/.project b/.project
deleted file mode 100644
index c6c1278..0000000
--- a/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
- gravityforms
-
-
-
-
-
- org.eclipse.wst.jsdt.core.javascriptValidator
-
-
-
-
- org.eclipse.wst.validation.validationbuilder
-
-
-
-
- org.eclipse.dltk.core.scriptbuilder
-
-
-
-
-
- org.eclipse.php.core.PHPNature
- org.eclipse.wst.jsdt.core.jsNature
-
-
diff --git a/.settings/.jsdtscope b/.settings/.jsdtscope
deleted file mode 100644
index 2f6f983..0000000
--- a/.settings/.jsdtscope
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.settings/org.eclipse.core.resources.prefs b/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644
index 99f26c0..0000000
--- a/.settings/org.eclipse.core.resources.prefs
+++ /dev/null
@@ -1,2 +0,0 @@
-eclipse.preferences.version=1
-encoding/=UTF-8
diff --git a/.settings/org.eclipse.core.runtime.prefs b/.settings/org.eclipse.core.runtime.prefs
deleted file mode 100644
index 5a0ad22..0000000
--- a/.settings/org.eclipse.core.runtime.prefs
+++ /dev/null
@@ -1,2 +0,0 @@
-eclipse.preferences.version=1
-line.separator=\n
diff --git a/.settings/org.eclipse.php.core.prefs b/.settings/org.eclipse.php.core.prefs
deleted file mode 100644
index 212bc60..0000000
--- a/.settings/org.eclipse.php.core.prefs
+++ /dev/null
@@ -1,5 +0,0 @@
-eclipse.preferences.version=1
-include_path=0;/gravityforms
-phpVersion=php5.3
-useShortTags=false
-use_asp_tags_as_php=false
diff --git a/.settings/org.eclipse.wst.jsdt.ui.superType.container b/.settings/org.eclipse.wst.jsdt.ui.superType.container
deleted file mode 100644
index 3bd5d0a..0000000
--- a/.settings/org.eclipse.wst.jsdt.ui.superType.container
+++ /dev/null
@@ -1 +0,0 @@
-org.eclipse.wst.jsdt.launching.baseBrowserLibrary
\ No newline at end of file
diff --git a/.settings/org.eclipse.wst.jsdt.ui.superType.name b/.settings/org.eclipse.wst.jsdt.ui.superType.name
deleted file mode 100644
index 05bd71b..0000000
--- a/.settings/org.eclipse.wst.jsdt.ui.superType.name
+++ /dev/null
@@ -1 +0,0 @@
-Window
\ No newline at end of file
diff --git a/Gruntfile.js b/Gruntfile.js
new file mode 100644
index 0000000..78f9723
--- /dev/null
+++ b/Gruntfile.js
@@ -0,0 +1,24 @@
+module.exports = function( grunt ) {
+ // Project configuration.
+ grunt.initConfig( {
+ // Package
+ pkg: grunt.file.readJSON( 'package.json' ),
+
+ // Make POT
+ makepot: {
+ target: {
+ options: {
+ cwd: '',
+ domainPath: 'languages',
+ type: 'wp-plugin',
+ exclude: [],
+ }
+ }
+ },
+ } );
+
+ grunt.loadNpmTasks( 'grunt-wp-i18n' );
+
+ // Default task(s).
+ grunt.registerTask( 'pot', [ 'makepot' ] );
+};
diff --git a/change_log.txt b/change_log.txt
index 071b3e9..a127842 100644
--- a/change_log.txt
+++ b/change_log.txt
@@ -1,3 +1,10 @@
+-------------------------------------------------------------------------------------------------------------------
+Version 1.8.19
+ - Fixed Notices
+ - Fixed issue where entry exports were saved with a .txt extension in Safari
+ - Fixed issue when exporting custom post fields of type "checkbox".
+ - AF: Fixed issue where feed saved successfully message still displayed when fields failed validation.
+
-------------------------------------------------------------------------------------------------------------------
Version 1.8.18
diff --git a/export.php b/export.php
index aba3e2d..9b3e122 100644
--- a/export.php
+++ b/export.php
@@ -23,7 +23,7 @@ public static function maybe_export(){
$charset = get_option('blog_charset');
header('Content-Description: File Transfer');
header("Content-Disposition: attachment; filename=$filename");
- header('Content-Type: text/plain; charset=' . $charset, true);
+ header('Content-Type: text/csv; charset=' . $charset, true);
$buffer_length = ob_get_length(); //length or false if no buffer
if ($buffer_length > 1){
ob_clean();
diff --git a/form_display.php b/form_display.php
index b6551a3..6fcc794 100644
--- a/form_display.php
+++ b/form_display.php
@@ -1946,13 +1946,13 @@ private static function get_conditional_logic($form, $field_values = array()){
$date_info = GFcommon::parse_date($field_val, $format);
switch($format){
case "mdy":
- $field_val = $date_info["month"] . "/" . $date_info["day"] . "/" . $date_info["year"];
+ $field_val = rgar($date_info, "month") . "/" . rgar($date_info, "day") . "/" . rgar($date_info, "year");
break;
case "dmy":
- $field_val = $date_info["day"] . "/" . $date_info["month"] . "/" . $date_info["year"];
+ $field_val = rgar($date_info, "day" ) . "/" . rgar($date_info, "month" ) . "/" . rgar($date_info, "year" );
break;
case "ymd":
- $field_val = $date_info["year"] . "/" . $date_info["month"] . "/" . $date_info["day"];
+ $field_val = rgar($date_info, "year") . "/" . rgar($date_info, "month" ) . "/" . rgar($date_info, "day" );
break;
}
}
diff --git a/forms_model.php b/forms_model.php
index dc11d25..5326b50 100644
--- a/forms_model.php
+++ b/forms_model.php
@@ -2079,22 +2079,34 @@ public static function prepare_value($form, $field, $value, $input_name, $lead_i
if(rgar($field, "adminOnly") && rgar($field, "allowsPrepopulate"))
$value = json_decode($value);
- if(GFCommon::is_empty_array($value))
+ if(GFCommon::is_empty_array($value)){
$value = "";
+ }
else{
+
+ foreach( $value as &$val ){
+ $val = self::sanitize_entry_value( $field, $val, $input_type, $form_id );
+ }
+
$value = self::create_list_array($field, $value);
$value = serialize($value);
}
break;
case "radio" :
- if(rgar($field, 'enableOtherChoice') && $value == 'gf_other_choice')
+ if(rgar($field, 'enableOtherChoice') && $value == 'gf_other_choice'){
$value = rgpost("input_{$field['id']}_other");
+ }
+ $value = self::sanitize_entry_value( $field, $value, $input_type, $form_id);
+
break;
case "multiselect" :
$value = empty($value) ? "" : is_array($value) ? implode(",", $value) : $value;
- break;
+
+ $value = self::sanitize_entry_value( $field, $value, $input_type, $form_id );
+
+ break;
case "creditcard" :
//saving last 4 digits of credit card
@@ -2136,15 +2148,8 @@ public static function prepare_value($form, $field, $value, $input_name, $lead_i
// only filter HTML on non-array based values
if( ! is_array( $value ) ) {
-
- //allow HTML for certain field types
- $allow_html = in_array($field["type"], array("post_custom_field", "post_title", "post_content", "post_excerpt", "post_tags" )) || in_array($input_type, array("checkbox", "radio")) ? true : false;
- $allowable_tags = apply_filters("gform_allowable_tags_{$form_id}", apply_filters("gform_allowable_tags", $allow_html, $field, $form_id), $field, $form_id);
-
- if($allowable_tags !== true)
- $value = strip_tags($value, $allowable_tags);
-
- }
+ $value = self::sanitize_entry_value( $field, $value, $input_type, $form_id );
+ }
break;
}
@@ -2179,6 +2184,14 @@ public static function prepare_value($form, $field, $value, $input_name, $lead_i
return $value;
}
+ public static function strip_script_tag( $string ){
+ $allowable_tags = '