mirror of
https://github.com/Automattic/wordpress-activitypub
synced 2024-10-18 14:23:31 +00:00
It seems that Mastodon has issues with HTML in summaries (#893)
Fixes: https://github.com/mastodon/mastodon/issues/28455 Until this is merged: https://github.com/mastodon/mastodon/pull/28629
This commit is contained in:
parent
8bff92d260
commit
2729f2f0e1
3 changed files with 7 additions and 0 deletions
|
@ -28,9 +28,11 @@ class Hashtag {
|
|||
* @return array the activity object array
|
||||
*/
|
||||
public static function filter_activity_object( $object_array ) {
|
||||
/* Removed until this is merged: https://github.com/mastodon/mastodon/pull/28629
|
||||
if ( ! empty( $object_array['summary'] ) ) {
|
||||
$object_array['summary'] = self::the_content( $object_array['summary'] );
|
||||
}
|
||||
*/
|
||||
|
||||
if ( ! empty( $object_array['content'] ) ) {
|
||||
$object_array['content'] = self::the_content( $object_array['content'] );
|
||||
|
|
|
@ -24,9 +24,11 @@ class Link {
|
|||
* @return array the activity object array
|
||||
*/
|
||||
public static function filter_activity_object( $object_array ) {
|
||||
/* Removed until this is merged: https://github.com/mastodon/mastodon/pull/28629
|
||||
if ( ! empty( $object_array['summary'] ) ) {
|
||||
$object_array['summary'] = self::the_content( $object_array['summary'] );
|
||||
}
|
||||
*/
|
||||
|
||||
if ( ! empty( $object_array['content'] ) ) {
|
||||
$object_array['content'] = self::the_content( $object_array['content'] );
|
||||
|
|
|
@ -1211,5 +1211,8 @@ function generate_post_summary( $post, $length = 500 ) {
|
|||
$content = $content[0] . ' ' . $excerpt_more;
|
||||
}
|
||||
|
||||
/* Removed until this is merged: https://github.com/mastodon/mastodon/pull/28629
|
||||
return \apply_filters( 'the_excerpt', $content );
|
||||
*/
|
||||
return $content;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue