diff --git a/modules/contact-form/grunion-contact-form.php b/modules/contact-form/grunion-contact-form.php index 264ce9d472eaa..5ccf24a508d21 100644 --- a/modules/contact-form/grunion-contact-form.php +++ b/modules/contact-form/grunion-contact-form.php @@ -139,7 +139,7 @@ protected function __construct() { ) { add_filter( 'widget_text', array( $this, 'widget_shortcode_hack' ), 5 ); } - + add_filter( 'jetpack_contact_form_is_spam', array( $this, 'is_spam_blacklist' ), 10, 2 ); // Akismet to the rescue @@ -634,7 +634,7 @@ function widget_shortcode_hack( $text ) { return $text; } - + /** * Check if a submission matches the Comment Blacklist. * The Comment Blacklist is a means to moderate discussion, and contact @@ -650,11 +650,11 @@ function is_spam_blacklist( $is_spam, $form = array() ) { if ( $is_spam ) { return $is_spam; } - + if ( wp_blacklist_check( $form['comment_author'], $form['comment_author_email'], $form['comment_author_url'], $form['comment_content'], $form['user_ip'], $form['user_agent'] ) ) { return true; } - + return false; } @@ -1802,6 +1802,11 @@ class Grunion_Contact_Form extends Crunion_Contact_Form_Shortcode { */ static $style = false; + /** + * @var array When printing the submit button, what tags are allowed + */ + static $allowed_html_tags_for_submit_button = array( 'br' => array() ); + function __construct( $attributes, $content = null ) { global $post; @@ -2060,12 +2065,16 @@ static function parse( $attributes, $content ) { $submit_button_text = $form->get_attribute( 'submit_button_text' ); } - $r .= "\t\t"; + if ( is_user_logged_in() ) { $r .= "\t\t" . wp_nonce_field( 'contact-form_' . $id, '_wpnonce', true, false ) . "\n"; // nonce and referer } diff --git a/modules/subscriptions/views.php b/modules/subscriptions/views.php index 73438dc9b6867..2d154543f1e6f 100644 --- a/modules/subscriptions/views.php +++ b/modules/subscriptions/views.php @@ -2,6 +2,10 @@ class Jetpack_Subscriptions_Widget extends WP_Widget { static $instance_count = 0; + /** + * @var array When printing the submit button, what tags are allowed + */ + static $allowed_html_tags_for_submit_button = array( 'br' => array() ); function __construct() { $widget_ops = array( @@ -289,14 +293,21 @@ static function render_widget_subscription_form( $args, $instance, $subscribe_em blog_id, '_wpnonce', false ); ?> - class="" style="" - /> + > + +

- class="" @@ -357,7 +368,13 @@ class="" style="" name="jetpack_subscriptions_widget" - /> + > + +