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

Trim Url field in Entry editor #4288

Closed
Siedlerchr opened this issue Aug 23, 2018 · 4 comments
Closed

Trim Url field in Entry editor #4288

Siedlerchr opened this issue Aug 23, 2018 · 4 comments
Labels
component: entry-editor good first issue An issue intended for project-newcomers. Varies in difficulty. [outdated] type: bug Confirmed bugs or reports that are very likely to be bugs

Comments

@Siedlerchr
Copy link
Member

Feature request/bug report from the Forum:

  1. Copy the following in the source tab of an entry
  2. Try to open the url
  3. Explorer is opened (on windows)

Solution would be to trim the url field automatically

URL = {
https://doi.org/10.1175/1520-0469(2003)060 1<1655:TOSOCC>2.0.CO;2
},

http://discourse.jabref.org/t/jabref-cannot-identify-the-url-if-there-is-space-between-the-url-and-opening-and-closing-braces/1314

@Siedlerchr Siedlerchr added component: entry-editor good first issue An issue intended for project-newcomers. Varies in difficulty. labels Aug 23, 2018
@tobiasdiez tobiasdiez added the [outdated] type: bug Confirmed bugs or reports that are very likely to be bugs label Aug 23, 2018
@stefan-kolb
Copy link
Member

I thought opening and closing spaces were automatically trimmed for each field before?

@adityaveda
Copy link

Can't seem to pinpoint where URL fields are to be trimmed.
The only method that seems to deal with URLs is in ModsExporter.java called
addURL. I added code to trim URL but doesnt reflect in the application.
Does anyone know what I am missing?

@Siedlerchr
Copy link
Member Author

Hi,
The right place is in the Entry Editor. I saw that there is already a paste handler for the the URL field in the fieldseditors class. I think it should be sufficient to create a copy of the RemoveNewlinesFormatter which only removes newlines before the first opening brace and the last closing brace and then add this as paste handler to the code area

@Songyu-Wang Songyu-Wang mentioned this issue Sep 19, 2018
6 tasks
@tobiasdiez
Copy link
Member

Thanks to @Songyu-Wang, this should be fixed in the latest development version. Could you please check the build from http://builds.jabref.org/master/. Thanks! Please remember to make a backup of your library before trying-out this version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: entry-editor good first issue An issue intended for project-newcomers. Varies in difficulty. [outdated] type: bug Confirmed bugs or reports that are very likely to be bugs
Projects
Archived in project
Development

No branches or pull requests

4 participants