Skip to content

Commit 2729f2f

Browse files
authored
It seems that Mastodon has issues with HTML in summaries (#893)
Fixes: mastodon/mastodon#28455 Until this is merged: mastodon/mastodon#28629
1 parent 8bff92d commit 2729f2f

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

includes/class-hashtag.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,11 @@ public static function init() {
2828
* @return array the activity object array
2929
*/
3030
public static function filter_activity_object( $object_array ) {
31+
/* Removed until this is merged: https://github.com/mastodon/mastodon/pull/28629
3132
if ( ! empty( $object_array['summary'] ) ) {
3233
$object_array['summary'] = self::the_content( $object_array['summary'] );
3334
}
35+
*/
3436

3537
if ( ! empty( $object_array['content'] ) ) {
3638
$object_array['content'] = self::the_content( $object_array['content'] );

includes/class-link.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,11 @@ public static function init() {
2424
* @return array the activity object array
2525
*/
2626
public static function filter_activity_object( $object_array ) {
27+
/* Removed until this is merged: https://github.com/mastodon/mastodon/pull/28629
2728
if ( ! empty( $object_array['summary'] ) ) {
2829
$object_array['summary'] = self::the_content( $object_array['summary'] );
2930
}
31+
*/
3032

3133
if ( ! empty( $object_array['content'] ) ) {
3234
$object_array['content'] = self::the_content( $object_array['content'] );

includes/functions.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1211,5 +1211,8 @@ function generate_post_summary( $post, $length = 500 ) {
12111211
$content = $content[0] . ' ' . $excerpt_more;
12121212
}
12131213

1214+
/* Removed until this is merged: https://github.com/mastodon/mastodon/pull/28629
12141215
return \apply_filters( 'the_excerpt', $content );
1216+
*/
1217+
return $content;
12151218
}

0 commit comments

Comments
 (0)