From 21cff7f24b14005a0053cfa1a883f21b571fae28 Mon Sep 17 00:00:00 2001 From: Matthias Pfefferle Date: Mon, 20 Feb 2023 18:17:02 +0100 Subject: [PATCH] version bump --- README.md | 7 ++++++- activitypub.php | 2 +- includes/model/class-post.php | 5 +++-- readme.txt | 7 ++++++- 4 files changed, 16 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 9de8b8f..a0ba36f 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ **Tags:** OStatus, fediverse, activitypub, activitystream **Requires at least:** 4.7 **Tested up to:** 6.1 -**Stable tag:** 0.16.2 +**Stable tag:** 0.16.3 **Requires PHP:** 5.6 **License:** MIT **License URI:** http://opensource.org/licenses/MIT @@ -88,6 +88,11 @@ Where 'blog' is the path to the subdirectory at which your blog resides. Project maintained on GitHub at [pfefferle/wordpress-activitypub](https://github.com/pfefferle/wordpress-activitypub). +### 0.16.3 ### + +* "cc", "to", ... fields can either be an array or a string +* Remove "style" and "script" HTML elements from content + ### 0.16.2 ### * Fix fatal error in outbox diff --git a/activitypub.php b/activitypub.php index d30bf3f..92a2aa7 100644 --- a/activitypub.php +++ b/activitypub.php @@ -3,7 +3,7 @@ * Plugin Name: ActivityPub * Plugin URI: https://github.com/pfefferle/wordpress-activitypub/ * Description: The ActivityPub protocol is a decentralized social networking protocol based upon the ActivityStreams 2.0 data format. - * Version: 0.16.2 + * Version: 0.16.3 * Author: Matthias Pfefferle * Author URI: https://notiz.blog/ * License: MIT diff --git a/includes/model/class-post.php b/includes/model/class-post.php index a431287..2197a83 100644 --- a/includes/model/class-post.php +++ b/includes/model/class-post.php @@ -385,9 +385,10 @@ class Post { wp_reset_postdata(); $content = \wpautop( \wp_kses( $content, $this->allowed_tags ) ); + $content = \trim( \preg_replace( '/[\n\r\t]/', '', $content ) ); - $filtered_content = \apply_filters( 'activitypub_the_content', $content, $post ); - $content = \html_entity_decode( $filtered_content, \ENT_QUOTES, 'UTF-8' ); + $content = \apply_filters( 'activitypub_the_content', $content, $post ); + $content = \html_entity_decode( $content, \ENT_QUOTES, 'UTF-8' ); $this->content = $content; diff --git a/readme.txt b/readme.txt index ad6ad3d..387ed30 100644 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Donate link: https://notiz.blog/donate/ Tags: OStatus, fediverse, activitypub, activitystream Requires at least: 4.7 Tested up to: 6.1 -Stable tag: 0.16.2 +Stable tag: 0.16.3 Requires PHP: 5.6 License: MIT License URI: http://opensource.org/licenses/MIT @@ -88,6 +88,11 @@ Where 'blog' is the path to the subdirectory at which your blog resides. Project maintained on GitHub at [pfefferle/wordpress-activitypub](https://github.com/pfefferle/wordpress-activitypub). += 0.16.3 = + +* "cc", "to", ... fields can either be an array or a string +* Remove "style" and "script" HTML elements from content + = 0.16.2 = * Fix fatal error in outbox