We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 294dea2 commit 20cc871Copy full SHA for 20cc871
location.go
@@ -28,10 +28,12 @@ type LocationService struct {
28
// city, state|name
29
func (l LocationService) ParseLocation(s string) (*Location, error) {
30
parts := strings.Split(s, "|")
31
- loc := parts[0]
+ loc := strings.ReplaceAll(parts[0], "\n", "")
32
+ loc = strings.ReplaceAll(loc, "\r", "")
33
var name string
34
if len(parts) > 1 {
- name = parts[1]
35
+ name = strings.ReplaceAll(parts[1], "\n", "")
36
+ name = strings.ReplaceAll(name, "\r", "")
37
}
38
m := latLonRe.FindStringSubmatch(loc)
39
if m != nil {
0 commit comments