Markdown output loses backslashes before pipes and splits rows on carriage returns
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 82/100
Research direction
Start with runner.Result.MarkdownRow and the escapeMarkdown implementation mentioned in the issue; the provided Go reproduction exercises both cases without HTTP requests. Check how backslashes and LF are handled, then run the reproduction and render its output as a GitHub Markdown table. Done when the literal backslash is preserved and CR, CRLF, and LF inside cells no longer split a result into extra rows.
Written by the indexing model from the issue text.
Description
httpx version:
Current dev, 9b6d8077ef7afa119dd6d28eeaf78a6556557acc (Linux amd64, Go 1.27.0). The same escapeMarkdown implementation is in v1.12.0.
Current Behavior:
Markdown output loses literal backslashes before a pipe. A carriage return inside a field can also split one result into two table rows.
For example, a response with title left\|right and <meta name="generator" content="left right"> produces a title cell with two backslashes before the pipe and leaves the generator's carriage return intact. GitHub's Markdown renderer displays the title as left|right and makes an extra row at the carriage return. Later columns no longer line up with their headings.
Expected Behavior:
Keep the literal backslash in the title and flatten CR/CRLF as well as LF inside table cells, so each result stays on one row.
Steps To Reproduce:
This reproduces the output formatting without making any HTTP requests. From a checkout of current dev, save this as /tmp/httpx-markdown-repro.go and run go run /tmp/httpx-markdown-repro.go:
package main
import (
"fmt"
"github.com/projectdiscovery/httpx/runner"
)
func main() {
r := runner.Result{
Title: "left\\|right",
Generator: "left\rright",
StatusCode: 200,
}
fmt.Print(r.MarkdownHeader(), r.MarkdownRow(nil))
}
Render the output as a GitHub Markdown table. The title loses its backslash, and the generator value starts a second row.
Anything else:
I also reproduced this through the CLI against a loopback-only Python HTTP server serving the two fields. Escaping existing backslashes and normalizing CRLF/CR before writing the cell fixes both cases locally. No external targets are needed.
- Dominant language
- Go
- Stars
- 10.6k
- Forks
- 1.1k
- Avg merge
- 22h 16m
- Merged PRs (30d)
- 24
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from projectdiscovery/httpx
-
-p range keeps http&https for every port after the first one that merges two schemesPossibly taken @dwisiswant0 claimed this 4 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
projectdiscovery/httpx#2732 · 1 assignee ·
Maintainers usually reply within 1 day
-
Headless screenshots are slow and can capture half-rendered SPAsPossibly taken @Mzack9999 claimed this 93 days ago. Open
Difficulty 5/5 Over a week Newbie friendliness 35/100
projectdiscovery/httpx#2646 ·
Maintainers usually reply within 1 day
-
Add a local mirror of the hugging face model JSONMay be free again @dogancanbakir claimed this 69 days ago, and no pull request is open. OpenType: Enhancement
projectdiscovery/httpx#2568 · 1 comment · 1 reaction · 1 assignee ·
Maintainers usually reply within 1 day
-
httpx --screenshot not working on AlpinePossibly taken @Mzack9999 claimed this 6 days ago. OpenType: Bug
Difficulty 3/5 1-2 days Newbie friendliness 20/100
projectdiscovery/httpx#2193 · 3 comments ·
Maintainers usually reply within 1 day
All issues in projectdiscovery/httpx
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
charmbracelet/huh#849 ·
-
help wanted stage/010-actionable
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
hivecommons/hive#18458 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
suzuki-shunsuke/tfcmt#2636 ·
Maintainers usually reply within 1 day
-
ui: links opened in a new tab omit the public URL path prefix (e.g. rotations on a schedule's assignments page)Possibly taken @dginther claimed this today. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Containerpak/cpak#93 ·