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

Fix encoding of project name in doc url #2851

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

andymagee
Copy link
Contributor

JavaDocExternalFilter.getExternalDocInfoForElement does a comparison to determine if the given doc URL is coming from the built in server. However, it does this using a constructed string that fails to correctly encode the project name, so the comparison does not work for any project names that contains characters needing encoding (like a space).

Using Urls.newHttpUrl() to make the comparison string fixes the issue, since this is the same API used in BuiltInWebBrowserUrlProvider to create the doc URL in the first place.

JavaDocExternalFilter.getExternalDocInfoForElement does a comparison to
determine if the given doc URL is coming from the built in server.
However, it does this using a constructed string that fails to correctly
encode the project name, so the comparison does not work for any project
names that contains characters needing encoding (like a space).

Using Urls.newHttpUrl() to make the comparison string fixes the issue,
since this is the same API used in BuiltInWebBrowserUrlProvider to
create the doc URL in the first place.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant