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
Correctly encode URL strings before use by Fetch URL #6140
Comments
@tfmorris Thanks for writing this issue. I would like to see the problem stated or edited so that it's more clear of the direct issue and which function or feature of OpenRefine. In my mind, users currently can use Add Column based on... and then use GREL .escape("url") correct? Then given that method of first creating URLs in that manner, then secondary running Fetch on that created column of escaped/encoded URLs, then it would be the same as browsers perform, correct or not quite? |
Rereading your other created issues, so maybe proposal should begin with: Change the internal Fetch function so that it encodes the value... Which will bring clarity to WHAT and WHERE things are proposing to change. (I realize of course you likely were head down typing all these issues up quickly and assumed more but let's be explicit to help any new contributors looking at these, no matter self-assigned or not as a best practice; and thanks!) |
@thadguidry Even if I did some copy editing to the issue to hopefully make it clearer. Let me know if it's still too confusing. |
Currently users are required to know what URLs might need encoding and correctly encode them before using them with the "Edit Column" -> "Add column by fetching URLs..." operation. I can't think of a circumstance where the user benefits from using the string directly, as is, so I would suggest that we attempt to encode it as a URL in the same way that a web browser would for addresses entered in its browser bar.
Proposed solution
Before attempting to use strings as URLs for the Fetch URL operation, encode them in the same way the a web browser would for text that a user typed/pasted into the browser address bar. These strings are cell values as transformed by the GREL expression the user enters (which defaults to simply
value
).Alternatives considered
The text was updated successfully, but these errors were encountered: