Skip to content

Commit

Permalink
It seems that Mastodon has issues with HTML in summaries (#893)
Browse files Browse the repository at this point in the history
  • Loading branch information
pfefferle authored Sep 15, 2024
1 parent 8bff92d commit 2729f2f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions includes/class-hashtag.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@ public static function init() {
* @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'] );
Expand Down
2 changes: 2 additions & 0 deletions includes/class-link.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@ public static function init() {
* @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'] );
Expand Down
3 changes: 3 additions & 0 deletions includes/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

0 comments on commit 2729f2f

Please sign in to comment.