sourcegraph / zoekt

Fast trigram based code search
Apache License 2.0
598 stars 80 forks source link

URLs for code links are escaping `+`s found in file paths #807

Open rnc505 opened 1 month ago

rnc505 commented 1 month ago

What is the problem?

On the results page, if a search result contains a + in the file path, e.g. filename is SwiftFileName+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 becomes https://github.com/OrganizationName/RepositoryName/path/to/SwiftFileName+SwiftCategoryName.swift, which leads to a broken page.

Why is this a problem?

Proposed fix

keegancsmith commented 1 month ago

Thanks for the report, should be an easy fix.

rnc505 commented 1 month ago

Awesome, thank you!