Formidable Forms – Form Builder for WordPress - Version 2.05.03

Version Description

  • Enhancement: Clean up BCC and CC email buttons on small screens
  • Security enhancement: Use wp_kses instead of wp_kses_post for showing entries
  • Enhancement: Add more HTML options to the wp_kses filters
  • Fix: Correctly show the list of trashed forms after one is permanently deleted
  • Pro Version Forms
  • New: Add frm_xml_field_export_value hook
  • Fix: PHP error when editing an entry with a date field set as the post date
  • Fix: Field value formatting when exporting XML
  • Fix: Allow striphtml=1 to work for array values
  • Fix: Prevent confirmation field from moving down on small screens
Download this release

Release Info

Developer sswells
Plugin Icon 128x128 Formidable Forms – Form Builder for WordPress
Version 2.05.03
Comparing to
See all releases

Code changes from version 2.05.02 to 2.05.03

classes/controllers/FrmAddonsController.php CHANGED
@@ -28,6 +28,7 @@ class FrmAddonsController {
28
  return;
29
  }
30
 
 
31
  $allow_autofill = self::allow_autofill();
32
 
33
  include( FrmAppHelper::plugin_path() . '/classes/views/addons/settings.php' );
28
  return;
29
  }
30
 
31
+ ksort( $plugins );
32
  $allow_autofill = self::allow_autofill();
33
 
34
  include( FrmAppHelper::plugin_path() . '/classes/views/addons/settings.php' );
classes/controllers/FrmFormsController.php CHANGED
@@ -14,7 +14,7 @@ class FrmFormsController {
14
 
15
  public static function maybe_load_listing_hooks() {
16
  $action = FrmAppHelper::simple_get( 'frm_action', 'sanitize_title' );
17
- if ( ! empty( $action ) && ! in_array( $action, array( 'list', 'trash', 'untrash' ) ) ) {
18
  return;
19
  }
20
 
14
 
15
  public static function maybe_load_listing_hooks() {
16
  $action = FrmAppHelper::simple_get( 'frm_action', 'sanitize_title' );
17
+ if ( ! empty( $action ) && ! in_array( $action, array( 'list', 'trash', 'untrash', 'destroy' ) ) ) {
18
  return;
19
  }
20
 
classes/helpers/FrmAppHelper.php CHANGED
@@ -10,7 +10,7 @@ class FrmAppHelper {
10
  /**
11
  * @since 2.0
12
  */
13
- public static $plug_version = '2.05.02';
14
 
15
  /**
16
  * @since 1.07.02
@@ -358,27 +358,115 @@ class FrmAppHelper {
358
  * Sanitize the value, and allow some HTML
359
  * @since 2.0
360
  * @param string $value
361
- * @param array $allowed
362
  * @return string
363
  */
364
  public static function kses( $value, $allowed = array() ) {
365
- $html = array(
366
- 'a' => array(
367
- 'href' => array(),
368
- 'title' => array(),
369
- 'id' => array(),
370
- 'class' => array(),
371
- ),
372
- );
373
 
 
 
 
 
 
 
 
 
374
  $allowed_html = array();
375
- foreach ( $allowed as $a ) {
376
- $allowed_html[ $a ] = isset( $html[ $a ] ) ? $html[ $a ] : array();
 
 
 
 
377
  }
378
 
379
- $allowed_html = apply_filters( 'frm_striphtml_allowed_tags', $allowed_html );
 
380
 
381
- return wp_kses( $value, $allowed_html );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
382
  }
383
 
384
  /**
10
  /**
11
  * @since 2.0
12
  */
13
+ public static $plug_version = '2.05.03';
14
 
15
  /**
16
  * @since 1.07.02
358
  * Sanitize the value, and allow some HTML
359
  * @since 2.0
360
  * @param string $value
361
+ * @param array|string $allowed 'all' for everything included as defaults
362
  * @return string
363
  */
364
  public static function kses( $value, $allowed = array() ) {
365
+ $allowed_html = self::allowed_html( $allowed );
 
 
 
 
 
 
 
366
 
367
+ return wp_kses( $value, $allowed_html );
368
+ }
369
+
370
+ /**
371
+ * @since 2.05.03
372
+ */
373
+ private static function allowed_html( $allowed ) {
374
+ $html = self::safe_html();
375
  $allowed_html = array();
376
+ if ( $allowed == 'all' ) {
377
+ $allowed_html = $html;
378
+ } else {
379
+ foreach ( $allowed as $a ) {
380
+ $allowed_html[ $a ] = isset( $html[ $a ] ) ? $html[ $a ] : array();
381
+ }
382
  }
383
 
384
+ return apply_filters( 'frm_striphtml_allowed_tags', $allowed_html );
385
+ }
386
 
387
+ /**
388
+ * @since 2.05.03
389
+ */
390
+ private static function safe_html() {
391
+ return array(
392
+ 'a' => array(
393
+ 'class' => array(),
394
+ 'href' => array(),
395
+ 'id' => array(),
396
+ 'rel' => array(),
397
+ 'title' => array(),
398
+ ),
399
+ 'abbr' => array(
400
+ 'title' => array(),
401
+ ),
402
+ 'b' => array(),
403
+ 'blockquote' => array(
404
+ 'cite' => array(),
405
+ ),
406
+ 'br' => array(),
407
+ 'cite' => array(
408
+ 'title' => array(),
409
+ ),
410
+ 'code' => array(),
411
+ 'del' => array(
412
+ 'datetime' => array(),
413
+ 'title' => array(),
414
+ ),
415
+ 'dd' => array(),
416
+ 'div' => array(
417
+ 'class' => array(),
418
+ 'id' => array(),
419
+ 'title' => array(),
420
+ 'style' => array(),
421
+ ),
422
+ 'dl' => array(),
423
+ 'dt' => array(),
424
+ 'em' => array(),
425
+ 'h1' => array(),
426
+ 'h2' => array(),
427
+ 'h3' => array(),
428
+ 'h4' => array(),
429
+ 'h5' => array(),
430
+ 'h6' => array(),
431
+ 'i' => array(),
432
+ 'img' => array(
433
+ 'alt' => array(),
434
+ 'class' => array(),
435
+ 'height' => array(),
436
+ 'id' => array(),
437
+ 'src' => array(),
438
+ 'width' => array(),
439
+ ),
440
+ 'li' => array(
441
+ 'class' => array(),
442
+ 'id' => array(),
443
+ ),
444
+ 'ol' => array(
445
+ 'class' => array(),
446
+ 'id' => array(),
447
+ ),
448
+ 'p' => array(
449
+ 'class' => array(),
450
+ 'id' => array(),
451
+ ),
452
+ 'pre' => array(),
453
+ 'q' => array(
454
+ 'cite' => array(),
455
+ 'title' => array(),
456
+ ),
457
+ 'span' => array(
458
+ 'class' => array(),
459
+ 'id' => array(),
460
+ 'title' => array(),
461
+ 'style' => array(),
462
+ ),
463
+ 'strike' => array(),
464
+ 'strong' => array(),
465
+ 'ul' => array(
466
+ 'class' => array(),
467
+ 'id' => array(),
468
+ ),
469
+ );
470
  }
471
 
472
  /**
classes/helpers/FrmEntriesHelper.php CHANGED
@@ -253,7 +253,7 @@ class FrmEntriesHelper {
253
  }
254
 
255
  $val = implode(', ', (array) $field_value );
256
- return wp_kses_post( $val );
257
  }
258
 
259
  /**
@@ -322,7 +322,7 @@ class FrmEntriesHelper {
322
  }
323
 
324
  if ( ! $atts['keepjs'] && ! is_array( $value ) ) {
325
- $value = wp_kses_post( $value );
326
  }
327
 
328
  return apply_filters('frm_display_value', $value, $field, $atts);
253
  }
254
 
255
  $val = implode(', ', (array) $field_value );
256
+ return FrmAppHelper::kses( $val, 'all' );
257
  }
258
 
259
  /**
322
  }
323
 
324
  if ( ! $atts['keepjs'] && ! is_array( $value ) ) {
325
+ $value = FrmAppHelper::kses( $value, 'all' );
326
  }
327
 
328
  return apply_filters('frm_display_value', $value, $field, $atts);
classes/views/addons/settings.php CHANGED
@@ -19,7 +19,7 @@
19
  ?>
20
 
21
  <div class="edd_frm_license_row">
22
- <label class="frm_left_label" for="edd_<?php echo esc_attr( $slug ) ?>_license_key"><?php echo wp_kses( sprintf( '%s license key', $plugin->plugin_name ), array() ); ?></label>
23
  <div class="edd_frm_authorized alignleft <?php echo esc_attr( $activate == 'activate' ) ? 'frm_hidden' : '' ?>">
24
  <span class="edd_frm_license"><?php esc_html_e( 'Good to go!', 'formidable' ); ?></span>
25
  <span class="frm_icon_font frm_action_icon frm_error_icon edd_frm_status_icon frm_inactive_icon"></span>
19
  ?>
20
 
21
  <div class="edd_frm_license_row">
22
+ <label class="frm_left_label" for="edd_<?php echo esc_attr( $slug ) ?>_license_key"><?php echo esc_html( $plugin->plugin_name ); ?></label>
23
  <div class="edd_frm_authorized alignleft <?php echo esc_attr( $activate == 'activate' ) ? 'frm_hidden' : '' ?>">
24
  <span class="edd_frm_license"><?php esc_html_e( 'Good to go!', 'formidable' ); ?></span>
25
  <span class="frm_icon_font frm_action_icon frm_error_icon edd_frm_status_icon frm_inactive_icon"></span>
classes/views/frm-form-actions/_email_settings.php CHANGED
@@ -1,5 +1,5 @@
1
  <table class="form-table frm-no-margin">
2
- <tr>
3
  <th><label <?php FrmAppHelper::maybe_add_tooltip('email_to') ?>><?php _e( 'To', 'formidable' ) ?></label>
4
  </th>
5
  <td><input type="text" name="<?php echo esc_attr( $this->get_field_name('email_to') ) ?>" value="<?php echo esc_attr( $form_action->post_content['email_to'] ); ?>" class="frm_not_email_to frm_email_blur large-text <?php FrmAppHelper::maybe_add_tooltip('email_to', 'open') ?>" id="<?php echo esc_attr( $this->get_field_id('email_to') ) ?>" />
@@ -13,7 +13,7 @@
13
  ?>" data-emailrow="bcc"><?php _e( 'BCC', 'formidable' ) ?></a>
14
  </td>
15
  </tr>
16
- <tr class="frm_cc_row<?php echo empty( $form_action->post_content['cc'] ) ? ' frm_hidden' : ''; ?>" >
17
  <th><label <?php FrmAppHelper::maybe_add_tooltip('cc') ?>><?php _e( 'CC', 'formidable' ) ?></label>
18
  </th>
19
  <td class="frm_right_addon">
@@ -22,7 +22,7 @@
22
  </td>
23
  <td></td>
24
  </tr>
25
- <tr class="frm_bcc_row<?php echo empty( $form_action->post_content['bcc'] ) ? ' frm_hidden' : ''; ?>" >
26
  <th><label <?php FrmAppHelper::maybe_add_tooltip('bcc') ?>><?php _e( 'BCC', 'formidable' ) ?></label>
27
  </th>
28
  <td class="frm_right_addon">
@@ -31,7 +31,7 @@
31
  </td>
32
  <td></td>
33
  </tr>
34
- <tr class="frm_reply_to_row<?php echo empty( $form_action->post_content['reply_to'] ) ? ' frm_hidden' : ''; ?>">
35
  <th><label <?php FrmAppHelper::maybe_add_tooltip('reply_to') ?>><?php _e( 'Reply to', 'formidable' ) ?></label>
36
  </th>
37
  <td class="frm_right_addon">
@@ -40,12 +40,14 @@
40
  </td>
41
  <td></td>
42
  </tr>
43
- <tr>
44
  <th><label <?php FrmAppHelper::maybe_add_tooltip('from') ?>><?php _e( 'From', 'formidable' ) ?></label></th>
45
  <td><input type="text" name="<?php echo esc_attr( $this->get_field_name('from') ) ?>" value="<?php echo esc_attr( $form_action->post_content['from'] ); ?>" class="frm_not_email_to frm_email_blur large-text <?php FrmAppHelper::maybe_add_tooltip('from', 'open') ?>" id="<?php echo esc_attr( $this->get_field_id('from') ) ?>" />
46
  </td>
47
  <td><a href="javascript:void(0)" class="button frm_email_buttons frm_reply_to_button <?php echo ( ! empty( $form_action->post_content['reply_to'] ) ? 'frm_hidden' : '' ) ?>" data-emailrow="reply_to"><?php _e( 'Reply To', 'formidable' ) ?></a></td>
48
  </tr>
 
 
49
  <tr>
50
  <td colspan="3" class="frm_no_top_padding">
51
  <p><label <?php FrmAppHelper::maybe_add_tooltip('email_subject', '', $form->name) ?>><?php _e( 'Subject', 'formidable' ) ?></label><br/>
1
  <table class="form-table frm-no-margin">
2
+ <tr class="frm_to_row frm_email_row">
3
  <th><label <?php FrmAppHelper::maybe_add_tooltip('email_to') ?>><?php _e( 'To', 'formidable' ) ?></label>
4
  </th>
5
  <td><input type="text" name="<?php echo esc_attr( $this->get_field_name('email_to') ) ?>" value="<?php echo esc_attr( $form_action->post_content['email_to'] ); ?>" class="frm_not_email_to frm_email_blur large-text <?php FrmAppHelper::maybe_add_tooltip('email_to', 'open') ?>" id="<?php echo esc_attr( $this->get_field_id('email_to') ) ?>" />
13
  ?>" data-emailrow="bcc"><?php _e( 'BCC', 'formidable' ) ?></a>
14
  </td>
15
  </tr>
16
+ <tr class="frm_cc_row frm_email_row<?php echo empty( $form_action->post_content['cc'] ) ? ' frm_hidden' : ''; ?>" >
17
  <th><label <?php FrmAppHelper::maybe_add_tooltip('cc') ?>><?php _e( 'CC', 'formidable' ) ?></label>
18
  </th>
19
  <td class="frm_right_addon">
22
  </td>
23
  <td></td>
24
  </tr>
25
+ <tr class="frm_bcc_row frm_email_row<?php echo empty( $form_action->post_content['bcc'] ) ? ' frm_hidden' : ''; ?>" >
26
  <th><label <?php FrmAppHelper::maybe_add_tooltip('bcc') ?>><?php _e( 'BCC', 'formidable' ) ?></label>
27
  </th>
28
  <td class="frm_right_addon">
31
  </td>
32
  <td></td>
33
  </tr>
34
+ <tr class="frm_reply_to_row frm_email_row<?php echo empty( $form_action->post_content['reply_to'] ) ? ' frm_hidden' : ''; ?>">
35
  <th><label <?php FrmAppHelper::maybe_add_tooltip('reply_to') ?>><?php _e( 'Reply to', 'formidable' ) ?></label>
36
  </th>
37
  <td class="frm_right_addon">
40
  </td>
41
  <td></td>
42
  </tr>
43
+ <tr class="frm_from_row frm_email_row">
44
  <th><label <?php FrmAppHelper::maybe_add_tooltip('from') ?>><?php _e( 'From', 'formidable' ) ?></label></th>
45
  <td><input type="text" name="<?php echo esc_attr( $this->get_field_name('from') ) ?>" value="<?php echo esc_attr( $form_action->post_content['from'] ); ?>" class="frm_not_email_to frm_email_blur large-text <?php FrmAppHelper::maybe_add_tooltip('from', 'open') ?>" id="<?php echo esc_attr( $this->get_field_id('from') ) ?>" />
46
  </td>
47
  <td><a href="javascript:void(0)" class="button frm_email_buttons frm_reply_to_button <?php echo ( ! empty( $form_action->post_content['reply_to'] ) ? 'frm_hidden' : '' ) ?>" data-emailrow="reply_to"><?php _e( 'Reply To', 'formidable' ) ?></a></td>
48
  </tr>
49
+ </table>
50
+ <table class="form-table frm-no-margin">
51
  <tr>
52
  <td colspan="3" class="frm_no_top_padding">
53
  <p><label <?php FrmAppHelper::maybe_add_tooltip('email_subject', '', $form->name) ?>><?php _e( 'Subject', 'formidable' ) ?></label><br/>
css/frm_admin.css CHANGED
@@ -1236,13 +1236,10 @@ select.frm_cancelnew, input.frm_enternew{width:175px;}
1236
  content: "\f142" !important;
1237
  }
1238
 
1239
- .ab-icon.frm_dashicon_font:before{
1240
- vertical-align: middle;
1241
- }
1242
-
1243
  .frm_email_settings .widget .widget-top, .frm_email_settings .widget .widget-top h3{
1244
- cursor:pointer;
1245
  }
 
1246
  .frm_email_settings .widget, #frm_email_addon_menu{
1247
  margin-bottom:15px;
1248
  line-height: 1.4em;
@@ -1275,12 +1272,15 @@ select.frm_cancelnew, input.frm_enternew{width:175px;}
1275
  .frm_form_action_settings .widget-inside{
1276
  min-height:25px;
1277
  }
 
 
1278
  .frm_form_action_settings .widget-title h3,
1279
  #frm_email_addon_menu h3{
1280
  display: inline-block;
1281
  border-bottom:none;
1282
  padding: 10px;
1283
  }
 
1284
  #frm_email_addon_menu h3{
1285
  font-size: 14px;
1286
  line-height: 1.4;
@@ -1301,7 +1301,7 @@ label.frm_action_events{
1301
  padding-left:15px;
1302
  }
1303
  .frm_actions_list > li > a:before,
1304
- .frm_email_settings h3 .frm_form_action_icon:before{
1305
  margin:0 5px;
1306
  vertical-align: middle;
1307
  font-size:18px;
@@ -1315,9 +1315,8 @@ label.frm_action_events{
1315
  .frm_email_icons, .frm_actions_list{
1316
  padding: 10px 0 10px 15px;
1317
  }
1318
- .frm_email_icon:before {
1319
- vertical-align: text-top;
1320
- margin-right: 5px;
1321
  }
1322
  .frm_actions_list a.frm_inactive_action:before{
1323
  color:#d6d6d6;
@@ -2014,9 +2013,6 @@ table td.frm_left_label{
2014
  font-size:16px;
2015
  line-height:20px;
2016
  }
2017
- .frm_email_icons{
2018
- padding-left:6px;
2019
- }
2020
 
2021
  .frm_update_msg{
2022
  border-style:solid;
@@ -2462,6 +2458,31 @@ Responsive Design
2462
  display:none !important;
2463
  }
2464
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2465
  }
2466
  @media (min-width:768px){
2467
  .navbar-right .frm-dropdown-menu{right:0;left:auto;}
@@ -2499,7 +2520,7 @@ Responsive Design
2499
  #poststuff #post-body.columns-2{margin-right:0;}
2500
  .widget, .postbox, .stuffbox, .postbox h3{border-width:0 !important;border-color:#fff;}
2501
  .postbox{background:#fff !important;border:none;position:static;}
2502
- .postbox h3{background:#fff !important;}
2503
  #wpbody-content{float:none;}
2504
  #wpcontent, #post-body-content,
2505
  .has-right-sidebar #post-body,
1236
  content: "\f142" !important;
1237
  }
1238
 
 
 
 
 
1239
  .frm_email_settings .widget .widget-top, .frm_email_settings .widget .widget-top h3{
1240
+ cursor:pointer;
1241
  }
1242
+
1243
  .frm_email_settings .widget, #frm_email_addon_menu{
1244
  margin-bottom:15px;
1245
  line-height: 1.4em;
1272
  .frm_form_action_settings .widget-inside{
1273
  min-height:25px;
1274
  }
1275
+ .frm_form_action_settings .widget-title h4,
1276
+ #frm_email_addon_menu h4,
1277
  .frm_form_action_settings .widget-title h3,
1278
  #frm_email_addon_menu h3{
1279
  display: inline-block;
1280
  border-bottom:none;
1281
  padding: 10px;
1282
  }
1283
+ #frm_email_addon_menu h4,
1284
  #frm_email_addon_menu h3{
1285
  font-size: 14px;
1286
  line-height: 1.4;
1301
  padding-left:15px;
1302
  }
1303
  .frm_actions_list > li > a:before,
1304
+ .frm_email_settings .widget-title .frm_form_action_icon:before{
1305
  margin:0 5px;
1306
  vertical-align: middle;
1307
  font-size:18px;
1315
  .frm_email_icons, .frm_actions_list{
1316
  padding: 10px 0 10px 15px;
1317
  }
1318
+ .frm_email_icons{
1319
+ padding-left:6px;
 
1320
  }
1321
  .frm_actions_list a.frm_inactive_action:before{
1322
  color:#d6d6d6;
2013
  font-size:16px;
2014
  line-height:20px;
2015
  }
 
 
 
2016
 
2017
  .frm_update_msg{
2018
  border-style:solid;
2458
  display:none !important;
2459
  }
2460
 
2461
+ #frm_notification_settings .frm_email_buttons {
2462
+ height: 40px;
2463
+ margin: 0 4px;
2464
+ line-height: 2em;
2465
+ }
2466
+
2467
+ .frm_right_addon .frm_remove_field {
2468
+ bottom: 11px;
2469
+ }
2470
+
2471
+ #frm_notification_settings .frm_bcc_cc_container {
2472
+ min-width: 128px;
2473
+ width: 25%
2474
+ }
2475
+
2476
+ .frm_email_row td:nth-child(2) {
2477
+ width: 65%;
2478
+ display: inline-block;
2479
+ }
2480
+
2481
+ .frm_email_row td:nth-child(3) {
2482
+ width: 25%;
2483
+ display: inline-block;
2484
+ }
2485
+
2486
  }
2487
  @media (min-width:768px){
2488
  .navbar-right .frm-dropdown-menu{right:0;left:auto;}
2520
  #poststuff #post-body.columns-2{margin-right:0;}
2521
  .widget, .postbox, .stuffbox, .postbox h3{border-width:0 !important;border-color:#fff;}
2522
  .postbox{background:#fff !important;border:none;position:static;}
2523
+ .postbox h3, .postbox h4{background:#fff !important;}
2524
  #wpbody-content{float:none;}
2525
  #wpcontent, #post-body-content,
2526
  .has-right-sidebar #post-body,
formidable.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  Plugin Name: Formidable Forms
4
  Description: Quickly and easily create drag-and-drop forms
5
- Version: 2.05.02
6
  Plugin URI: https://formidableforms.com/
7
  Author URI: https://formidableforms.com/
8
  Author: Strategy11
2
  /*
3
  Plugin Name: Formidable Forms
4
  Description: Quickly and easily create drag-and-drop forms
5
+ Version: 2.05.03
6
  Plugin URI: https://formidableforms.com/
7
  Author URI: https://formidableforms.com/
8
  Author: Strategy11
languages/formidable-es_ES.mo ADDED
Binary file
languages/formidable-es_ES.po ADDED
@@ -0,0 +1,8031 @@