Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

URL encode the var name passed to search.

  • Loading branch information...
commit 3fabb0b93cbc491a92cdf7eb649b44033de430e0 1 parent 1916457
Anthony Grimes authored January 26, 2012

Showing 1 changed file with 4 additions and 3 deletions. Show diff stats Hide diff stats

  1. 7  src/cd_client/core.clj
7  src/cd_client/core.clj
@@ -2,7 +2,8 @@
2 2
   (:use [clojure.java.browse :only [browse-url]])
3 3
   (:require [cheshire.core :as json]
4 4
             [clj-http.client :as http]
5  
-            [clojure.string :as string]))
  5
+            [clojure.string :as string])
  6
+  (:import java.net.URLEncoder))
6 7
 
7 8
 
8 9
 ;; For testing purposes use localhost:8080
@@ -114,8 +115,8 @@
114 115
 
115 116
 (defn search
116 117
   "Search for a method name within an (optional) namespace"
117  
-  ([name]    (get-simple (str *search-api* name)))
118  
-  ([ns name] (get-simple (str *search-api* ns "/" name))))
  118
+  ([name]    (get-simple (str *search-api* (URLEncoder/encode (str name)))))
  119
+  ([ns name] (get-simple (str *search-api* ns "/" (URLEncoder/encode (str name))))))
119 120
 
120 121
 
121 122
 (defn comments-core

0 notes on commit 3fabb0b

Please sign in to comment.
Something went wrong with that request. Please try again.