Skip to content

Conversation

@rocketeerbkw
Copy link
Member

General Checklist

  • Affected Issues have been mentioned in the Closing issues section
  • Documentation has been written/updated
  • PR title is ready for inclusion in changelog

The existing JSON renderer uses the default Go json.Marshal() which escapes content assuming it will be in an HTML context. This causes URLs to be invalid in a cli context.

2026-01-13_19-13

Closing issues

n/a

@shreddedbacon shreddedbacon force-pushed the disable-output-json-html-encode branch from 7354de3 to 3680ab3 Compare February 3, 2026 21:24
@shreddedbacon shreddedbacon enabled auto-merge (squash) February 3, 2026 21:24
@shreddedbacon shreddedbacon force-pushed the disable-output-json-html-encode branch from 3680ab3 to 5854110 Compare February 3, 2026 21:46
@shreddedbacon
Copy link
Member

shreddedbacon commented Feb 3, 2026

#485 i think broke the output for this, this fixes it

index d61c07f..1f1d5e3 100644
--- a/pkg/output/main_test.go
+++ b/pkg/output/main_test.go
@@ -138,7 +138,8 @@ func TestRenderString(t *testing.T) {
        output := RenderString(testData, outputOptions)
        checkEqual(t, output, testSuccess1, " render string processing failed")
 
-       var testSuccess2 = `"Plain string message"`
+       var testSuccess2 = `"Plain string message"
+`
        outputOptions.JSON = true
 
        output = RenderString(testData, outputOptions)```

Copy link
Member

@shreddedbacon shreddedbacon left a comment

Choose a reason for hiding this comment

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

Needs some checking on the failure

@rocketeerbkw rocketeerbkw force-pushed the disable-output-json-html-encode branch from 5854110 to b613086 Compare February 5, 2026 01:51
@rocketeerbkw
Copy link
Member Author

Since this changes how JSON is printed, it will probably break tests again with #486, if you wanna merge that one first.

@shreddedbacon
Copy link
Member

Since this changes how JSON is printed, it will probably break tests again with #486, if you wanna merge that one first.

I'll let you rebase/fix as required for this one then. Once I get the notification of your update I'll run through the review again.

@rocketeerbkw rocketeerbkw force-pushed the disable-output-json-html-encode branch from b613086 to 9f02212 Compare February 5, 2026 02:31
@shreddedbacon shreddedbacon merged commit ea770b6 into main Feb 5, 2026
8 checks passed
@shreddedbacon shreddedbacon deleted the disable-output-json-html-encode branch February 5, 2026 02:40
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.

3 participants