Skip to content

Commit

Permalink
Follow Blog Widget: Strip Slashes on Subscribe Text (#39433)
Browse files Browse the repository at this point in the history
Removes slashes from the Subscribe text output on the Follow Blog
widget. It looks like the Subscribe block already does this, which is
why the issue doesn't happen there. It's just been annoying me a bit
lately that the Follow Blog widget doesn't do the same too.
  • Loading branch information
Aurorum authored Sep 30, 2024
1 parent 178bdd9 commit e0ddd28
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions projects/plugins/jetpack/changelog/fix-subscribe-slashes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: bugfix

Subscriptions: fix added slashes to the Follow Blog widget.
2 changes: 1 addition & 1 deletion projects/plugins/jetpack/modules/subscriptions/views.php
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ public static function render_widget_subscription_form( $args, $instance, $subsc
$show_subscribers_total = (bool) $instance['show_subscribers_total'];
$subscribers_total = self::fetch_subscriber_count();
$subscribe_text = empty( $instance['show_only_email_and_button'] ) ?
wp_kses_post( $instance['subscribe_text'] ) :
wp_kses_post( stripslashes( $instance['subscribe_text'] ) ) :
false;
$referer = esc_url_raw( ( is_ssl() ? 'https' : 'http' ) . '://' . ( isset( $_SERVER['HTTP_HOST'] ) ? wp_unslash( $_SERVER['HTTP_HOST'] ) : '' ) . ( isset( $_SERVER['REQUEST_URI'] ) ? wp_unslash( $_SERVER['REQUEST_URI'] ) : '' ) );
$source = 'widget';
Expand Down

0 comments on commit e0ddd28

Please sign in to comment.