Skip to content

fix: prevent unicode escaping of '+' in variable get output#183

Merged
Carael merged 1 commit into
mainfrom
fix/variable-get-unicode-escaping
Apr 30, 2026
Merged

fix: prevent unicode escaping of '+' in variable get output#183
Carael merged 1 commit into
mainfrom
fix/variable-get-unicode-escaping

Conversation

@lazydonkeytim
Copy link
Copy Markdown
Contributor

JsonNode.ToJsonString() uses JavaScriptEncoder.Default which unnecessarily escapes '+' (U+002B) as \u002b in the output.

  • VariableGetPipeline: use result.ToString() for console display to get the raw string value without JSON encoding artifacts
  • JsonNodeOutputFormatter: pass JavaScriptEncoder.UnsafeRelaxedJsonEscaping to ToJsonString() so --format json output preserves '+' literally

JsonNode.ToJsonString() uses JavaScriptEncoder.Default which unnecessarily
escapes '+' (U+002B) as \u002b in the output.

- VariableGetPipeline: use result.ToString() for console display to get the
  raw string value without JSON encoding artifacts
- JsonNodeOutputFormatter: pass JavaScriptEncoder.UnsafeRelaxedJsonEscaping
  to ToJsonString() so --format json output preserves '+' literally
@lazydonkeytim lazydonkeytim requested a review from glucaci April 30, 2026 09:26
Copy link
Copy Markdown
Contributor

@Carael Carael left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@Carael Carael merged commit 6bdf63b into main Apr 30, 2026
1 check passed
@Carael Carael deleted the fix/variable-get-unicode-escaping branch April 30, 2026 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants