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

Invalid URL detection in cell UI #4546

Closed
wetneb opened this issue Feb 18, 2022 · 7 comments · Fixed by #4954
Closed

Invalid URL detection in cell UI #4546

wetneb opened this issue Feb 18, 2022 · 7 comments · Fixed by #4954
Assignees
Labels
Good First Issue Indicates issues suitable for newcomers to design or coding, providing a gentle introduction. Module: Frontend These issues involve working on HTML, CSS, and JavaScript code that affects the user interface. Type: Bug Issues related to software defects or unexpected behavior, which require resolution.
Milestone

Comments

@wetneb
Copy link
Member

wetneb commented Feb 18, 2022

Sometimes the cell UI gets URL boundaries wrong.

To Reproduce

Create a project and put the following string in a cell:

{{Information
|Description    = {{en|1=<br>
:'''Species''' {{Species-inline|vernacular=Wood Duck|binominal=Aix sponsa}}
:'''Recordist''' Jonathon Jongsma
:'''Remarks''' Bird seen. Several widely-spaced and rather strange hoarse 'screams' from a female wood duck sitting about 15m directly above my head in a large cottonwood at the edge of an urban park pond. Recording quality is rather poor because all I had with me was a mobile phone.
:'''Bird seen''' yes
:'''Elevation''' 250 m
:'''Country''' United States}}
|Source         = [http://www.xeno-canto.org/101287
|Author ](http://www.xeno-canto.org/101287|Author)        = Jonathon Jongsma
|Date           = 2012-05-10 07:53
|Permission     = 
|other_versions = 
}}{{Location dec|44.942|-93.259}}
{{Xeno-canto}}

=={{int:license-header}}==
{{cc-by-sa-3.0}}

[[Category:Sound files uploaded by Fæ]]
[[Category:Xeno-canto]]
[[Category:Audio files of Aix sponsa]]

Current Results

image

Expected Behavior

The URL should not continue on the following line.

Versions

  • Operating System: irrelevant
  • Browser Version: Firefox
  • JRE or JDK Version: irrelevant
  • OpenRefine: master branch
@wetneb wetneb added Type: Bug Issues related to software defects or unexpected behavior, which require resolution. Module: Frontend These issues involve working on HTML, CSS, and JavaScript code that affects the user interface. Good First Issue Indicates issues suitable for newcomers to design or coding, providing a gentle introduction. labels Feb 18, 2022
@WaltonG
Copy link
Member

WaltonG commented Feb 20, 2022

@wetneb Am volunteering to work on this issue

@Binita-tech
Copy link
Member

@wetneb , please assign me this issue.

@Binita-tech
Copy link
Member

@wetneb I created project and I had some confusion - Do I have to put above string in marked(black) one(below Image) to reproduce the issue?
image

@wetneb
Copy link
Member Author

wetneb commented Mar 30, 2022

Do I have to put above string in marked(black) one(below Image) to reproduce the issue?

I cannot parse your sentence, I am not sure what you mean, sorry! The issue involves URLs so to reproduce it you will definitely need to have some URLs in your cell values, and I cannot see any URLs in your screenshot.

@WaltonG
Copy link
Member

WaltonG commented Mar 31, 2022

@Binita-tech You can add URLs through the edit menu of the cells

@Binita-tech
Copy link
Member

Thanks @WaltonG
@wetneb I am able to reproduce the issue
image
I saw on the previous PR that you suggest to adapt the regex so that it does not accept newlines anywhere inside the URL.
So, I am planning to use url.replace(/\n/g,''''); to solve this bug, am I going in right direction?

@wetneb
Copy link
Member Author

wetneb commented Apr 1, 2022

I would try to adapt the regex that detects the URL so that it does not accept newlines directly. It is a complicated regex though!

Binita-tech added a commit to Binita-tech/OpenRefine that referenced this issue Apr 1, 2022
Binita-tech added a commit to Binita-tech/OpenRefine that referenced this issue Apr 2, 2022
Binita-tech added a commit to Binita-tech/OpenRefine that referenced this issue Apr 2, 2022
Binita-tech added a commit to Binita-tech/OpenRefine that referenced this issue Apr 3, 2022
Binita-tech added a commit to Binita-tech/OpenRefine that referenced this issue Apr 3, 2022
Binita-tech added a commit to Binita-tech/OpenRefine that referenced this issue Apr 3, 2022
@wetneb wetneb added this to the 3.7 milestone Jun 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good First Issue Indicates issues suitable for newcomers to design or coding, providing a gentle introduction. Module: Frontend These issues involve working on HTML, CSS, and JavaScript code that affects the user interface. Type: Bug Issues related to software defects or unexpected behavior, which require resolution.
Projects
None yet
4 participants