Skip to content

Fix compatibility with WordPress HTML sanitization changes - #3861

Closed
pfefferle wants to merge 1 commit into
trunkfrom
fix/wordpress-html-sanitization
Closed

pfefferle wants to merge 1 commit into
trunkfrom
fix/wordpress-html-sanitization

Conversation

@pfefferle

Copy link
Copy Markdown
Member

Separates the WordPress compatibility fixes from #3850.

Proposed changes:

  • WordPress development changes HTML serialization and GUID entity spelling, causing 21 failures on unchanged plugin trunk. Match both stored ampersand spellings when finding or deduplicating incoming activities and remote posts, preserving redelivery behavior across upgrades.
  • Remove unsupported MathML annotations before sanitizing so surrounding content remains visible.
  • Compare equivalent HTML structurally in tests, retaining compatibility with WordPress 6.5 and PHP 7.4.

Other information:

  • Have you written new tests for your changes, if applicable?

Testing instructions:

  • Run the PHPUnit matrix for PHP 7.4/WordPress 6.5, PHP 8.3/stable WordPress, and PHP 8.5/WordPress development, plus coverage.
  • Regression tests verify incoming URL lookups and redelivery using both stored ampersand spellings, recipient merging during deduplication, and retained content around stripped MathML annotations.
  • The same changes passed all matrix jobs in Display images attached to Fediverse comments #3850. CI on this PR verifies them independently of image comments. All added and removed lines match the previously reviewed compatibility commit.

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

Keep incoming posts and replies working when WordPress changes how it sanitizes HTML and links.

Already committed in .github/changelog/fix-wordpress-html-sanitization.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant