Permalink
Browse files

Some more corrections to fixing up names looked up in URLs in clojure…

…docs API
  • Loading branch information...
1 parent 095d039 commit 579ce05d4cad71b283d37a3b3502dd6e370533b0 @jafingerhut jafingerhut committed Mar 4, 2011
Showing with 10 additions and 1 deletion.
  1. +10 −1 src/cd_client/core.clj
@@ -19,9 +19,18 @@
"Replace some special characters in symbol names in order to construct a URL that works on clojuredocs.org"
[name]
(-> name
+ ;; TBD: Rather than adding things here as the crop up, it might
+ ;; be better to replace everything that is not on a short list
+ ;; of "known good" characters. Here are the ones that seem to
+ ;; work fine so far, without substitution in the API URLs:
+ ;; a-z A-Z 0-9 - * ? ! _ = $
+ ;; I'm not sure if / and + are working right now (Mar 3 2011)
(string/replace "." "_dot")
(string/replace "?" "_q")
- (string/replace "/" "_")))
+ (string/replace "/" "_")
+ (string/replace ">" "%3E")
+ (string/replace "<" "%3C")
+ (string/replace "|" "%7C")))
(defn remove-markdown

0 comments on commit 579ce05

Please sign in to comment.