diff --git a/server/handlers.go b/server/handlers.go
index bf7f8e07010871c11a8dc5ebe14a692ce27e1a04..bb15d692f67d48d76b26a920931958219ae8abf2 100644
--- a/server/handlers.go
+++ b/server/handlers.go
@@ -6,6 +6,7 @@ import (
 	"encoding/base64"
 	"encoding/json"
 	"fmt"
+	"html/template"
 	"net/http"
 	"net/url"
 	"path"
@@ -174,7 +175,7 @@ func (s *Server) handleAuthorization(w http.ResponseWriter, r *http.Request) {
 			ID:   conn.ID,
 			Name: conn.Name,
 			Type: conn.Type,
-			URL:  connURL.String(),
+			URL:  template.URL(connURL.String()),
 		}
 	}
 
diff --git a/server/templates.go b/server/templates.go
index e46855b174757210abf988e5fdae1a5a11ae4b9b..0307437ca2eeda2d42d072b5ddd88433dd1b003d 100644
--- a/server/templates.go
+++ b/server/templates.go
@@ -244,7 +244,7 @@ var scopeDescriptions = map[string]string{
 type connectorInfo struct {
 	ID   string
 	Name string
-	URL  string
+	URL  template.URL
 	Type string
 }