Repository navigation
Prevented double-escaping of content form attributes - #999
Merged
Merged
Conversation
Contributor
pirate-bot
requested changes
Oct 26, 2026
Contributor
There was a problem hiding this comment.
🟡 Changes requested
The escaping fix works, but two changed outputs have no test: the Elementor submit icon span and the Beaver address placeholder.
Validation details
- Files reviewed: 6/6 changed files.
- The new tests pass at HEAD on PHP 8.3 with PHPUnit 9.6:
cd /repo; cat /workspace/checks/R1/bin/phpunit; /workspace/checks/R1/bin/phpunit --do-not-cache-result --filter 'Test_Co…printedOK (5 tests, 11 assertions)(run R7) - All five tests fail on the
pr-basecode, so each one detects the change:set -o pipefail; B=/workspace/checks/R1/base-tree; rm -rf $B; mkdir -p $B; git -C /repo archive 768260b | tar -x -C $B &…printedTests: 5, Assertions: 5, Failures: 5.(run R8) - The full suite shows the same four existing
svg-uploadserrors before and after the change. Those errors come from missing Composer packages. - No
esc_attr()call aroundget_render_attribute_string()remains inobfx_modules. - The security check found every changed output escaped once.
Untested areas
- PHPCS was not run. CI runs the linter.
- The sandbox had no Composer packages. A prepend loaded
form_manager.phpfor the tests. CI loads it throughvendor/autoload.php. - Question for the author:
CONTRIBUTING.mdasks for tests undertests/php/unit, which does not exist. Should that document change?
🤖 Automated review · run code-review-agent_6adf42946343b4.10000057.
🤖 Review agent — review posted ✅ on 768260b2 · changes requested · 2 findings · 17 min
Run code-review-agent_6adf42946343b4.10000057 · trail
pirate-bot
approved these changes
Oct 26, 2026
Contributor
There was a problem hiding this comment.
🟢 Approved
The PR passes. The two new tests cover the submit icon span and the address placeholders, and both fail on the old code.
Validation details
- Files reviewed: 6/6 changed files. Since the last review, only the test file and two test stubs changed.
- The test class passes at HEAD on PHP 8.3 with PHPUnit 9.6:
cd /repo && export WP_TESTS_DIR=/var/www/html/.wp-tests/tests/phpunit; set -o pipefail; timeout 300 /workspace/checks/R1…printedOK (7 tests, 15 assertions)(run R2) - All seven tests fail when the three changed source files come from
pr-base:set -e; B=/workspace/checks/R1/base-tree; rm -rf $B; mkdir -p $B; git -C /repo archive c7e23148c03167b81ef61d6a528e1bcc1…printedTests: 7, Assertions: 7, Failures: 7.(run R3) - The source and security checks from run code-review-agent_6adf42946343b4.10000057 still apply. No source file changed since then. They were not rerun.
Untested areas
- PHPCS was not run. CI runs the linter.
- The sandbox had no Composer packages. A prepend loaded
form_manager.phpfor the tests. - No browser rendered a real Elementor or Beaver Builder page.
🤖 Automated review · run code-review-agent_6adf497d2fb1c7.11857478.
🤖 Review agent — review posted ✅ on c7e23148 · approved · 0 findings · 4 min
Run code-review-agent_6adf497d2fb1c7.11857478 · trail
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixed double-escaped HTML attributes in Elementor and Beaver Builder integrations by using Elementor’s
print_render_attribute_string()to output already-escaped attribute strings correctly andwp_kses_post()for editor notice previews. Updated the Beaver submit fieldset and placeholder attributes to print each value once within properly quoted attributes, and removed the stray quote after the Beaver text input. Also corrected additional affected paths beyond those identified in the issue while preserving PHPCS compliance.Check before Pull Request is ready:
Closes #993