- (let ((host (if (string-match-p ":" bare-host)
- (concat "[" bare-host "]")
- bare-host)))
- (if (and (equal type ?h)
- (string-prefix-p "URL:" selector))
- (elt (split-string selector "URL:") 1)
- (concat "gopher"
- (if (elpher-address-use-tls-p address) "s" "")
- "://"
- host
- (if (equal port 70)
- ""
- (format ":%d" port))
- "/" (string type)
- selector)))))
+ (url-encode-url
+ (let ((host (if (string-match-p ":" bare-host)
+ (concat "[" bare-host "]")
+ bare-host)))
+ (if (and (equal type ?h)
+ (string-prefix-p "URL:" selector))
+ (elt (split-string selector "URL:") 1)
+ (concat "gopher"
+ (if (elpher-address-use-tls-p address) "s" "")
+ "://"
+ host
+ (if (equal port 70)
+ ""
+ (format ":%d" port))
+ "/" (string type)
+ selector))))))