2 changes: 1 addition & 1 deletion assets/js/bot.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/js/scripts-admin-global.min.js
2 changes: 1 addition & 1 deletion assets/js/scripts-admin.min.js
2 changes: 1 addition & 1 deletion composer.json
Expand Up @@ -2,7 +2,7 @@
"name": "codeinwp/wp-maintenance-mode",
"description": "Adds a splash page to your site that lets visitors know your site is down for maintenance. Full access to the back- & front-end is optional.",
"type": "wordpress-plugin",
"version": "2.4.6",
"version": "2.4.7",
"license": "GPL-2.0+",
"homepage": "https://themeisle.com",
"support": {
Expand Down
3 changes: 2 additions & 1 deletion includes/classes/wp-maintenance-mode.php
Expand Up @@ -6,7 +6,7 @@

class WP_Maintenance_Mode {

const VERSION = '2.4.6';
const VERSION = '2.4.7';

protected $plugin_slug = 'wp-maintenance-mode';
protected $plugin_settings;
Expand Down Expand Up @@ -658,6 +658,7 @@ public function add_bot_extras() {
'typeName' => ! empty( $this->plugin_settings['bot']['responses']['01'] ) ? $this->plugin_settings['bot']['responses']['01'] : __( 'Type your name here…', 'wp-maintenance-mode' ),
'typeEmail' => ! empty( $this->plugin_settings['bot']['responses']['03'] ) ? $this->plugin_settings['bot']['responses']['03'] : __( 'Type your email here…', 'wp-maintenance-mode' ),
'send' => __( 'Send', 'wp-maintenance-mode' ),
'wpnonce' => wp_create_nonce( 'wpmts_nonce_subscribe' ),
);
echo "<script type='text/javascript'>" .
'var botVars = ' . wp_json_encode( $bot_vars ) .
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "wp-maintenance-mode",
"version": "2.4.6",
"version": "2.4.7",
"author": "Themeisle",
"homepage": "https://themeisle.com/",
"license": "GPL-3.0+",
Expand Down
12 changes: 11 additions & 1 deletion readme.txt
Expand Up @@ -7,7 +7,7 @@ Author URI: https://themeisle.com/
Tags: maintenance mode, admin, administration, unavailable, coming soon, multisite, landing page, under construction, contact form, subscribe, countdown
Requires at least: 3.5
Tested up to: 6.0
Stable tag: 2.4.6
Stable tag: 2.4.7
Requires PHP: 5.6
License: GPL-2.0+

Expand Down Expand Up @@ -91,6 +91,16 @@ Notice: `wp-cron.php` is excluded by default.

== Changelog ==

##### [Version 2.4.7](https://github.com/Codeinwp/wp-maintenance-mode/compare/v2.4.6...v2.4.7) (2022-08-08)

##### Fixes
* Fix login form display
* Fix email collecting by the bot
* Improve accessibility of the maintenance page thanks to @SophieWeb




##### [Version 2.4.6](https://github.com/Codeinwp/wp-maintenance-mode/compare/v2.4.5...v2.4.6) (2022-06-15)

* Improve data sanitizations for custom css and contact module
Expand Down
24 changes: 20 additions & 4 deletions views/maintenance.php
Expand Up @@ -18,11 +18,11 @@
defined( 'ABSPATH' ) || exit;
?>
<!DOCTYPE html>
<html>
<html <?php language_attributes(); ?> >
<head>
<meta charset="UTF-8">
<title><?php echo esc_html( $title ); ?></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="author" content="<?php echo esc_attr( $author ); ?>" />
<meta name="description" content="<?php echo esc_attr( $description ); ?>" />
<meta name="keywords" content="<?php echo esc_attr( $keywords ); ?>" />
Expand All @@ -35,7 +35,7 @@
<body class="<?php echo $body_classes ? esc_attr( $body_classes ) : ''; ?>">
<?php do_action( 'wpmm_after_body' ); ?>

<div class="wrap">
<div class="wrap" role="main">
<?php if ( ! empty( $heading ) ) { ?>
<!-- Heading -->
<h1><?php echo esc_html( $heading ); ?></h1>
Expand All @@ -47,9 +47,25 @@
* Also, we don't escape the $text, because wp_kses_post was applied before do_shortcode. So it's safe to output it.
*/
if ( ! empty( $text ) && $this->plugin_settings['bot']['status'] === 0 ) {
$allowed_html = wp_kses_allowed_html( 'post' );

$allowed_html['form'] = array(
'id' => array(),
'class' => array(),
'action' => array(),
'method' => array(),
);
$allowed_html['input'] = array(
'type' => array(),
'id' => array(),
'name' => array(),
'value' => array(),
'class' => array(),
'placeholder' => array(),
);
?>
<!-- Text -->
<h2><?php echo wp_kses_post( $text ); ?></h2>
<h2><?php echo wp_kses( $text, $allowed_html ); ?></h2>
<?php
}
?>
Expand Down
2 changes: 1 addition & 1 deletion wp-maintenance-mode.php
Expand Up @@ -4,7 +4,7 @@
*
* Plugin Name: WP Maintenance Mode & Coming Soon
* Description: Adds a splash page to your site that lets visitors know your site is down for maintenance. It's perfect for a coming soon page.
* Version: 2.4.6
* Version: 2.4.7
* Author: Themeisle
* Author URI: https://themeisle.com/
* Twitter: themeisle
Expand Down