Bug 6892

Summary: If a URL has been entered without http://, it isn't correctly linked
Product: Koha Reporter: Robin Sheat <robin>
Component: CatalogingAssignee: Galen Charlton <gmcharlt>
Status: NEW --- QA Contact: Bugs List <koha-bugs>
Severity: enhancement    
Priority: P5 - low CC: dcook, indradg, koha.sekjal, nick
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23423
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32794
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Robin Sheat 2011-09-21 06:01:45 UTC
If a MARC record contains a URL, and that URL doesn't have http:// at the start of it, then the link isn't correctly generated. We should catch that and insert the http prefix.
Comment 1 Robin Sheat 2011-09-21 06:02:18 UTC
Probably best to do this on display, or both display and cataloguing.
Comment 2 Ian Walls 2011-09-21 15:33:16 UTC
In MARC21, we can only assume http:// if the first indicator of the 856 is 4.  The 856 can handle other protocols (remember that MARC predates the WWW by quite a few years).

From Library of Congress

0 - Email
1 - FTP
2 - Remote login (Telnet)
3 - Dial-up
4 - HTTP
7 - Method specified in subfield $2
Comment 3 Robin Sheat 2011-09-21 20:46:25 UTC
Ah, good point, I hadn't checked the spec. However, at the moment it seems (without checking) that Koha assumes the browser knows what the URL is, which can be wrong too.
Comment 4 Katrin Fischer 2019-05-04 10:52:50 UTC
Maybe a good first step would be to add http in case of first indicator = 4 and the URL doesn't start with that or https already and leave the content alone otherwise.
Comment 5 Katrin Fischer 2020-03-30 21:44:10 UTC
*** Bug 23337 has been marked as a duplicate of this bug. ***
Comment 6 David Cook 2022-12-06 01:53:33 UTC
I think that there could be a URL validator in the editor, but we shouldn't be auto-adding things to existing data I reckon.
Comment 7 David Cook 2022-12-06 01:54:22 UTC
I think bug 8609 might be a good successor to this one.
Comment 8 Katrin Fischer 2023-08-05 09:27:32 UTC
(In reply to David Cook from comment #7)
> I think bug 8609 might be a good successor to this one.

Only that it was closed ages ago. - Is this still something we should look into? I assume we would not change the data, but fix anytime we create a HTML link?
Comment 9 Nick Clemens (kidclamp) 2023-08-08 13:47:34 UTC
Still valid? Or fixed by bug 32794?