Repository navigation
fix(runner): keep backslashes and one row per result in markdown output - #2736
Merged
Mzack9999 merged 1 commit intoNov 17, 2026
Merged
Conversation
escapeMarkdown escaped pipes but not backslashes, so a literal "\|" in a field became "\\|" and GitHub rendered it without the backslash. It also only flattened LF, so a CR or CRLF inside a field started a new table row and shifted the following columns. Escape backslashes along with pipes and turn CRLF, CR and LF into a space. Fixes projectdiscovery#2735
Mzack9999
approved these changes
Nov 17, 2026
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.
Proposed changes
Fixes #2735.
escapeMarkdownescaped pipes but not backslashes, so a literal\|in a field came out as\\|and GitHub showed it as|. It also only flattened\n, so a\ror\r\ninside a field (for example a generator meta value) started a new table row and pushed the later columns out of line.This escapes backslashes along with pipes and turns CRLF, CR and LF into a single space.
Proof
runner/md_output_test.go: table tests forescapeMarkdownand aMarkdownRowtest with the title and generator values from the issue (plus a CRLF webserver value). Both fail ondevand pass with the change.devit gives 3 table rows and the title showsleft|right; with the change it gives the header plus 1 row, 53 cells for 53 headings, and the title showsleft\|right.go test ./...,golangci-lint run(v2.15.0, 0 issues), the two examples,integration_tests/run.sh(all passed) and the Windows/macOS builds ofcmd/httpx.Checklist
Summary by CodeRabbit