Closed rnc505 closed 1 month ago
Thanks for the report, should be an easy fix.
Awesome, thank you!
Briefly looked into it, gets deeper into the weeds with https://github.com/golang/go/issues/42506
+
to #43
The template is executed here: https://github.com/sourcegraph/zoekt/blob/main/web/snippets.go#L79I thought this would be easy to solve, but it ended up being a pretty deep change. Hopefully https://github.com/sourcegraph/zoekt/pull/843 resolves this for you.
What is the problem?
On the results page, if a search result contains a
+
in the file path, e.g. filename isSwiftFileName+SwiftCategoryName.swift
, the URL escapes the+
such that it breaks the link.E.g. if the search result is expected to point to
https://github.com/OrganizationName/RepositoryName/path/to/SwiftFileName+SwiftCategoryName.swift
, the URL becomeshttps://github.com/OrganizationName/RepositoryName/path/to/SwiftFileName+SwiftCategoryName.swift
, which leads to a broken page.Why is this a problem?
+
should not be escaped, it's just wrongProposed fix
+
from being escaped in result URLs. There might be other symbols getting problematically escaped, but I have not encountered these yet