fix: #3618887 Transform only the code inside <ace> tags, leave surrounding text untouched

Fixes #3618887.

AceFilter::process() decoded the entire filtered text before matching, so it changed text outside any <ace> tag - a filter should only transform the part it owns. It now decodes only the extracted snippet content (handed to Ace as text) and leaves the surrounding text exactly as received.

Verification

Runtime-checked on Drupal 11.4.5: entity-encoded characters outside a tag are returned unchanged, and encoded content inside an <ace> tag is decoded for the editor. Two kernel tests added.

Note: the local containerised gate could not run during this work due to a transient network outage on the build host (apt mirror unreachable); PHPUnit passed 64 tests / 203 assertions in the eight rounds that completed before the outage, and the behaviour above was verified directly. The remote pipeline is the gate of record.

Checkpoints:

  • File an issue
  • Addition/Change/Update/Fix
  • Testing to ensure no regression
  • Automated unit testing coverage
  • Automated functional testing coverage
  • UX/UI designer responsibilities
  • Readability
  • Accessibility
  • Performance
  • Security
  • Developer Documentation
  • User Guide Documentation
  • Reviewed by human
  • Code review by maintainers
  • Full testing and approval
  • Credit contributors
  • Review with the product owner
  • Release notes snippet
  • Release

AI-Generated: Yes

Edited by Rajab Natshah

Merge request reports

Loading
Loading