rebase from live enviornment
This commit is contained in:
@@ -80,9 +80,15 @@
|
||||
var data = [];
|
||||
|
||||
$( this ).closest( 'form' ).find( '[data-config-field]' ).each( function() {
|
||||
var val = $( this ).val();
|
||||
|
||||
if ( $( this ).is( '[type=checkbox]' ) ) {
|
||||
val = $( this ).is( ':checked' ) ? 1 : 0;
|
||||
}
|
||||
|
||||
data.push( {
|
||||
'name': $( this ).attr( 'name' ).replace( /^wpcf7-/, '' ).replace( /-/g, '_' ),
|
||||
'value': $( this ).val()
|
||||
'value': val
|
||||
} );
|
||||
} );
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ function wpcf7_enqueue_block_editor_assets() {
|
||||
'contact-form-7-block-editor',
|
||||
sprintf(
|
||||
'window.wpcf7 = {contactForms:%s};',
|
||||
json_encode( $contact_forms )
|
||||
wp_json_encode( $contact_forms )
|
||||
),
|
||||
'before'
|
||||
);
|
||||
|
||||
@@ -275,6 +275,17 @@ function wpcf7_sanitize_unit_tag( $tag ) {
|
||||
function wpcf7_antiscript_file_name( $filename ) {
|
||||
$filename = wp_basename( $filename );
|
||||
|
||||
// Apply part of protection logic from sanitize_file_name().
|
||||
$filename = str_replace(
|
||||
array(
|
||||
'?', '[', ']', '/', '\\', '=', '<', '>', ':', ';', ',', "'", '"',
|
||||
'&', '$', '#', '*', '(', ')', '|', '~', '`', '!', '{', '}',
|
||||
'%', '+', '’', '«', '»', '”', '“', chr( 0 )
|
||||
),
|
||||
'',
|
||||
$filename
|
||||
);
|
||||
|
||||
$filename = preg_replace( '/[\r\n\t -]+/', '-', $filename );
|
||||
$filename = preg_replace( '/[\pC\pZ]+/iu', '', $filename );
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ class WPCF7_SWV_FileRule extends WPCF7_SWV_Rule {
|
||||
$acceptable_filetypes = array();
|
||||
|
||||
foreach ( (array) $this->get_property( 'accept' ) as $accept ) {
|
||||
if ( false === strpos( $accept, '/' ) ) {
|
||||
if ( preg_match( '/^\.[a-z0-9]+$/i', $accept ) ) {
|
||||
$acceptable_filetypes[] = strtolower( $accept );
|
||||
} else {
|
||||
foreach ( wpcf7_convert_mime_to_ext( $accept ) as $ext ) {
|
||||
|
||||
@@ -247,7 +247,7 @@ class WPCF7_ConstantContact extends WPCF7_Service_OAuth2 {
|
||||
'Accept' => 'application/json',
|
||||
'Content-Type' => 'application/json; charset=utf-8',
|
||||
),
|
||||
'body' => json_encode( $properties ),
|
||||
'body' => wp_json_encode( $properties ),
|
||||
);
|
||||
|
||||
$response = $this->remote_request( $endpoint, $request );
|
||||
|
||||
@@ -336,7 +336,7 @@ trait WPCF7_Sendinblue_API {
|
||||
'Content-Type' => 'application/json; charset=utf-8',
|
||||
'API-Key' => $this->get_api_key(),
|
||||
),
|
||||
'body' => json_encode( $properties ),
|
||||
'body' => wp_json_encode( $properties ),
|
||||
);
|
||||
|
||||
$response = wp_remote_post( $endpoint, $request );
|
||||
@@ -364,7 +364,7 @@ trait WPCF7_Sendinblue_API {
|
||||
'Content-Type' => 'application/json; charset=utf-8',
|
||||
'API-Key' => $this->get_api_key(),
|
||||
),
|
||||
'body' => json_encode( $properties ),
|
||||
'body' => wp_json_encode( $properties ),
|
||||
);
|
||||
|
||||
$response = wp_remote_post( $endpoint, $request );
|
||||
|
||||
@@ -61,7 +61,7 @@ class WPCF7_Stripe_API {
|
||||
$headers = array(
|
||||
'Authorization' => sprintf( 'Bearer %s', $this->secret ),
|
||||
'Stripe-Version' => self::api_version,
|
||||
'X-Stripe-Client-User-Agent' => json_encode( $ua ),
|
||||
'X-Stripe-Client-User-Agent' => wp_json_encode( $ua ),
|
||||
'User-Agent' => sprintf(
|
||||
'%1$s/%2$s (%3$s)',
|
||||
self::app_name,
|
||||
|
||||
@@ -5,7 +5,7 @@ Tags: contact, form, contact form, feedback, email, ajax, captcha, akismet, mult
|
||||
Requires at least: 6.2
|
||||
Requires PHP: 7.4
|
||||
Tested up to: 6.4
|
||||
Stable tag: 5.8.3
|
||||
Stable tag: 5.8.5
|
||||
License: GPLv2 or later
|
||||
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
@@ -78,6 +78,14 @@ Do you have questions or issues with Contact Form 7? Use these support channels
|
||||
|
||||
For more information, see [Releases](https://contactform7.com/category/releases/).
|
||||
|
||||
= 5.8.5 =
|
||||
|
||||
[https://contactform7.com/contact-form-7-585/](https://contactform7.com/contact-form-7-585/)
|
||||
|
||||
= 5.8.4 =
|
||||
|
||||
[https://contactform7.com/contact-form-7-584/](https://contactform7.com/contact-form-7-584/)
|
||||
|
||||
= 5.8.3 =
|
||||
|
||||
[https://contactform7.com/contact-form-7-583/](https://contactform7.com/contact-form-7-583/)
|
||||
|
||||
@@ -7,12 +7,12 @@
|
||||
* Author URI: https://ideasilo.wordpress.com/
|
||||
* License: GPL v2 or later
|
||||
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
||||
* Version: 5.8.3
|
||||
* Version: 5.8.5
|
||||
* Requires at least: 6.2
|
||||
* Requires PHP: 7.4
|
||||
*/
|
||||
|
||||
define( 'WPCF7_VERSION', '5.8.3' );
|
||||
define( 'WPCF7_VERSION', '5.8.5' );
|
||||
|
||||
define( 'WPCF7_REQUIRED_WP_VERSION', '6.2' );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user