Commits

Dominic Kexel committed 74b9dfa

renamed html-encode to hex-encode

  • Participants
  • Parent commits 376ffd5

Comments (0)

Files changed (1)

File src/mdclj/html.clj

   ([tag]
     (str \< tag " />")))
 
-(defn html-encode [text]
+(defn hex-encode [text]
   (to-string (map #(str "&#x" (.toUpperCase (Integer/toHexString (int %))) \;) text)))
 
 (defmulti format-span :type)
       (some #(startswith link %) ["http:" "https:" "ftp:"]) 
         (output-element "a" {"href" (to-string link)} #(to-string link))
       (in? link \@)
-        (output-element "a" {"href" (str (html-encode "mailto") \: (html-encode link))} #(html-encode link))
+        (output-element "a" {"href" (str (hex-encode "mailto") \: (hex-encode link))} #(hex-encode link))
       :else
         text)))