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:
Matthias Pfefferle 2024-09-15 09:58:27 +02:00 committed by GitHub
parent 8bff92d260
commit 2729f2f0e1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 7 additions and 0 deletions

View file

@ -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'] );

View file

@ -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'] );

View file

@ -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;
}