   (let [fortunes (conj (get-all-fortunes) {:id 0 :message "Additional fortune added at request time."} )]
     (sort-by #(:message %) fortunes)))
 
-(defn escape-html-local
-  "Change special characters into HTML character entities."
-  [text]
-  (.. ^String (as-str text)
-    (replace "&" "&amp;")
-    (replace "<" "&lt;")
-    (replace ">" "&gt;")
-    (replace "\"" "&quot;")
-    (replace "'" "&apos;")))
-
 (defn fortunes-hiccup [fortunes]
   "Render the given fortunes to simple HTML using Hiccup."
   (html5
-    [:head
-     [:title "Fortunes"]]
-    [:body
-     [:table
-      [:tr
-       [:th "id"]
-       [:th "message"]]
-      (for [x fortunes]
-        [:tr
-         [:td (:id x)]
-         [:td (escape-html-local (:message x))]])
-      ]]))
+   [:head
+    [:title "Fortunes"]]
+   [:body
+    [:table
+     [:tr
+      [:th "id"]
+      [:th "message"]]
+     (for [x fortunes]
+       [:tr
+        [:td (:id x)]
+        [:td (escape-html (:message x))]])
+     ]]))
 
 (defn fortunes-enlive [fortunes]
   "Render the given fortunes to simple HTML using Enlive."

        :headers {"Content-Type" "text/plain; charset=utf-8"}
        :body "Hello, World!"})
  (GET "/json" [] (response {:message "Hello, World!"}))
  (GET "/db/:queries" [queries] (response (run-queries (get-query-count queries))))
  (GET "/dbraw/:queries" [queries] (response (run-queries-raw (get-query-count queries))))
  (GET "/fortune" [] (response (get-fortunes)))
  (GET "/fortune-hiccup" [] (fortunes-hiccup (get-fortunes)))


; Run the specified number of queries, return the results
(defn run-queries [queries]
   (flatten ; Make it a list of maps
    (take
     queries ; Number of queries to run
     (repeatedly get-world))))

; Database connection for java.jdbc "raw"
; https://github.com/clojure/java.jdbc/blob/master/doc/clojure/java/jdbc/ConnectionPooling.md
