Skip to content

Escape control characters in message sign preview.#2517

Merged
fnando merged 2 commits intomainfrom
escape-control-escapes
Apr 23, 2026
Merged

Escape control characters in message sign preview.#2517
fnando merged 2 commits intomainfrom
escape-control-escapes

Conversation

@fnando
Copy link
Copy Markdown
Member

@fnando fnando commented Apr 23, 2026

Why

Follow-up on #2509 (comment)

Known limitations

[TODO or N/A]

@fnando fnando requested a review from leighmcculloch April 23, 2026 01:03
@fnando fnando self-assigned this Apr 23, 2026
Copilot AI review requested due to automatic review settings April 23, 2026 01:03
@fnando fnando added this to DevX Apr 23, 2026
@github-project-automation github-project-automation Bot moved this to Backlog (Not Ready) in DevX Apr 23, 2026
Copy link
Copy Markdown
Contributor

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 updates the message sign output preview to escape (rather than remove) control characters so terminal control sequences (e.g., ESC) aren’t emitted in the preview.

Changes:

  • Replaced control-character stripping with explicit escaping (\xNN) in message sign preview output.
  • Updated message sign command to use the new escaping helper.
  • Strengthened the integration test to assert the escaped form appears in stderr.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
cmd/soroban-cli/src/utils.rs Replaces the old control-character stripping helper with a new escaping implementation.
cmd/soroban-cli/src/commands/message/sign.rs Switches preview rendering to use the new escaping helper.
cmd/crates/soroban-test/tests/it/message.rs Adds an assertion that escaped ESC (\\x1b) appears in the preview output.

Comment thread cmd/soroban-cli/src/utils.rs
@fnando fnando enabled auto-merge (squash) April 23, 2026 02:28
@fnando fnando merged commit 7b3675a into main Apr 23, 2026
213 checks passed
@fnando fnando deleted the escape-control-escapes branch April 23, 2026 02:51
@github-project-automation github-project-automation Bot moved this from Backlog (Not Ready) to Done in DevX Apr 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants