Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

go/doc: ToHTML incorrectly marks up URLs containing :: in the filename component #18139

Closed
alandonovan opened this issue Dec 1, 2016 · 2 comments
Milestone

Comments

@alandonovan
Copy link
Contributor

See https://play.golang.org/p/763fuQgeJT

doc.ToHTML(os.Stdout, "before http://domain.com/x/y/z:b::c after", nil)
// got: before <a href="http://domain.com/x/y/z:b">http://domain.com/x/y/z:b</a>::c after</p>
// want: before <a href="http://domain.com/x/y/z:b">http://domain.com/x/y/z:b::c</a> after</p>

The urlRx regexp permits only a single colon in the file component, not a consecutive pair.

/cc @pjweinbgo

@bradfitz
Copy link
Contributor

bradfitz commented Dec 1, 2016

The regexp is kinda bogus.

It's not matching what its comments on the right suggest the author intended.

See https://play.golang.org/p/F56JrSSFO_

@bradfitz bradfitz added this to the Go1.9 milestone Dec 1, 2016
@gopherbot
Copy link

CL https://golang.org/cl/37192 mentions this issue.

@golang golang locked and limited conversation to collaborators Feb 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants