diff options
Diffstat (limited to 'skate')
-rw-r--r-- | skate/url.go | 2 | ||||
-rw-r--r-- | skate/url_test.go | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/skate/url.go b/skate/url.go index d8560ac..b37fe4d 100644 --- a/skate/url.go +++ b/skate/url.go @@ -36,7 +36,7 @@ func SanitizeURL(s string) string { ) if len(indices) > 1 { // http://ailab.ist.psu.edu/bcpred/SVMTriP:http://sysbio.unl.edu/SVMTriP/prediction.phpBcell - s = s[0:indices[1]] // only use the first + s = s[indices[0]:indices[1]] // only use the first s = strings.TrimRight(s, ":") s = strings.TrimRight(s, ";") } diff --git a/skate/url_test.go b/skate/url_test.go index 1a439a6..8f50162 100644 --- a/skate/url_test.go +++ b/skate/url_test.go @@ -124,6 +124,7 @@ func TestSanitizeURL(t *testing.T) { {`http.worldbank.org/sq`, `http://worldbank.org/sq`}, {`httpwww.sun.com`, `http://www.sun.com`}, {`httpswww.unos.org`, `http://www.unos.org`}, + {`ics.uci.edu/pub/ietf/`, `http://ics.uci.edu/pub/ietf/`}, } for _, c := range cases { out := SanitizeURL(c.in) |