Skip to content

Conversation

obenland
Copy link
Member

image

Proposed changes:

  • Decode html entities in reactor names.
  • Removes unused comment Id.

Testing instructions:

  • In a remote profile, add an apostrophe to your name.
  • Like a post.
  • Make sure the name shows up correctly in the Reactions block.

Changelog entry

  • Automatically create a changelog entry from the details below.
Changelog Entry Details

Significance

  • Patch
  • Minor
  • Major

Type

  • Added - for new features
  • Changed - for changes in existing functionality
  • Deprecated - for soon-to-be removed features
  • Removed - for now removed features
  • Fixed - for any bug fixes
  • Security - in case of vulnerabilities

Message

Names containing HTML entities now get displayed correctly in the Reactions block's list of users.

@obenland obenland requested review from pfefferle and Copilot June 12, 2025 19:51
@obenland obenland self-assigned this Jun 12, 2025
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR decodes HTML entities in reactor names to ensure names are displayed correctly in the Reactions block and removes an unused comment ID.

  • Decode HTML entities in the comment author string
  • Remove the unused "id" field from the rendered output
  • Update both source and build files accordingly

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/reactions/render.php Decodes HTML entities for comment names and removes unused IDs
build/reactions/render.php Mirrors the changes made in the source file
Comments suppressed due to low confidence (2)

src/reactions/render.php:75

  • Consider specifying the encoding and flags in html_entity_decode to ensure consistent decoding behavior, e.g., html_entity_decode($comment->comment_author, ENT_QUOTES, 'UTF-8').
'name'   => html_entity_decode( $comment->comment_author ),

build/reactions/render.php:75

  • Consider specifying the encoding and flags in html_entity_decode to ensure consistent decoding behavior, e.g., html_entity_decode($comment->comment_author, ENT_QUOTES, 'UTF-8').
'name'   => html_entity_decode( $comment->comment_author ),

@github-actions github-actions bot added [Block] Reactions [Feature] Reactions [Focus] Editor Changes to the ActivityPub experience in the block editor labels Jun 12, 2025
@obenland obenland merged commit 6f971d9 into trunk Jun 16, 2025
11 checks passed
@obenland obenland deleted the fix/reactions-name branch June 16, 2025 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Reactions [Feature] Reactions [Feature] REST API [Focus] Editor Changes to the ActivityPub experience in the block editor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants