fix(backend): fix links with spaces

This commit is contained in:
Łukasz Mierzwa
2022-10-28 12:51:22 +01:00
committed by Łukasz Mierzwa
parent b9ae3d9b3d
commit 46b566a92b
2 changed files with 4 additions and 2 deletions
+2
View File
@@ -81,6 +81,8 @@ var linkSchemes = []string{
}
func isLink(s string) bool {
s = strings.TrimSpace(s)
if strings.Contains(s, " ") {
return false
}
+2 -2
View File
@@ -66,7 +66,7 @@ var annotationMapsTestCases = []annotationMapsTestCase{
annotationMap: map[string]string{
"foo": "https://localhost/xxx",
"abc": "xyz",
"act": "https://localhost/act",
"act": "https://localhost/act ",
},
annotations: models.Annotations{
models.Annotation{
@@ -78,7 +78,7 @@ var annotationMapsTestCases = []annotationMapsTestCase{
},
models.Annotation{
Name: "act",
Value: "https://localhost/act",
Value: "https://localhost/act ",
Visible: true,
IsLink: true,
IsAction: true,