Skip to content

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Dec 20, 2025

Related GitHub Issue

Closes: #9563

Roo Code Task Context (Optional)

N/A

Description

This PR attempts to address Issue #9563 by removing the unescapeHtmlEntities function from all tool implementations that were inadvertently converting HTML entities to their literal character equivalents.

The problem was that HTML entities like ', <, > were being decoded to literal characters before tool operations were executed. This broke operations on JSX/TSX files and other scenarios where users intentionally wanted to use HTML entities.

Changes made:

  • Removed unescapeHtmlEntities import and usage from ExecuteCommandTool.ts (was unconditionally unescaping all commands)
  • Removed unescapeHtmlEntities from ApplyDiffTool.ts (was conditional for non-Claude models)
  • Removed unescapeHtmlEntities from WriteToFileTool.ts (was conditional for non-Claude models)
  • Removed unescapeHtmlEntities from MultiApplyDiffTool.ts (was conditional for non-Claude models in two places)
  • Updated test files to remove related test cases

Test Procedure

  1. Unit tests pass: cd src && npx vitest run core/tools/tests/writeToFileTool.spec.ts core/tools/tests/executeCommandTool.spec.ts
  2. TypeScript type checking passes: cd src && npx tsc --noEmit
  3. Manual verification: Use execute_command tool with a command containing HTML entities and verify the entities are preserved

Pre-Submission Checklist

  • Issue Linked: This PR is linked to an approved GitHub Issue (see "Related GitHub Issue" above).
  • Scope: My changes are focused on the linked issue (one major feature/fix per PR).
  • Self-Review: I have performed a thorough self-review of my code.
  • Testing: New and/or updated tests have been added to cover my changes (if applicable).
  • Documentation Impact: I have considered if my changes require documentation updates (see "Documentation Updates" section below).
  • Contribution Guidelines: I have read and agree to the Contributor Guidelines.

Feedback and guidance are welcome!

@roomote
Copy link
Contributor Author

roomote bot commented Dec 20, 2025

Rooviewer Clock   See task on Roo Cloud

Review complete. No issues found.

The PR correctly removes the unescapeHtmlEntities function from all tool implementations, which fixes the reported issue where HTML entities were being incorrectly decoded before tool operations. The changes are clean and properly address the root cause.

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Dec 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels.

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

[BUG] Roo things ' and &apos; are the same and fails to apply the change

3 participants