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

Illegal character in query: pipe character in file field #11876 #12062

Closed

Conversation

hitalo-siriano
Copy link

@hitalo-siriano hitalo-siriano commented Oct 23, 2024

This pull request implements URL escaping for the pipe character (|) in the FileFieldParser class. This change addresses issue #11876, which caused exceptions in JabRef when processing URLs that contained the pipe character.

Changes Made: Modified the FileFieldParser class to replace the pipe character with its encoded representation (%7C).
Ensured that URLs are properly handled to prevent exceptions.
Benefits: Resolves the recurring exception issue when opening .bib files with problematic URLs.
Related Issue: Closes #11876

Modified the handling of URLs in the file field to replace the pipe character (|) with its encoded representation (%7C) to avoid exceptions
in JabRef.

Closes JabRef#123
Modified the handling of URLs in the file field to replace the pipe character (|) with its encoded representation (%7C) to avoid exceptions
in JabRef.

Closes JabRef#11876
@Siedlerchr
Copy link
Member

Please add some tests for this as well!

Copy link
Member

@koppor koppor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please follow the advice at #11876 (comment)

The current issue is NOT a fix. The URL is a valid one and can be opened in a browser.

Also add tests.

@koppor koppor marked this pull request as draft October 23, 2024 08:02
@koppor koppor added the status: changes required Pull requests that are not yet complete label Oct 23, 2024
@hitalo-siriano
Copy link
Author

Thanks for the feedback. Following the steps in your comment #11876 (comment), should I implement the escape function in the URLUtil class and then replace all calls to URI.create throughout the project with the new function I created, centralizing the escaping process?
@koppor

@koppor
Copy link
Member

koppor commented Oct 23, 2024

Thanks for the feedback. Following the steps in your comment #11876 (comment), should I implement the escape function in the URLUtil class and then replace all calls to URI.create throughout the project with the new function I created, centralizing the escaping process?
@koppor

Yes

@hitalo-siriano hitalo-siriano deleted the fix-for-issue-11876 branch October 24, 2024 02:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: changes required Pull requests that are not yet complete
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Illegal character in query: pipe character in file field
3 participants