 specified id.
 
 Return a map, {:message, :url, :num-tests-passed}."
-  [id raw-code]
+  [id code]
   (try
-    (let [code (.trim raw-code)
-          {:keys [tests restricted] :as problem} (get-problem id)
+    (let [{:keys [tests restricted] :as problem} (get-problem id)
           sb-tester (get-tester restricted)
           user-forms (s/join " " (map pr-str (read-string-safely code)))
           results (if (empty? user-forms)

    (catch Throwable t {:message (.getMessage t), :url *url*
                        :num-tests-passed 0})))

(defn static-run-code [id raw-code]
  (let [{:keys [message url num-tests-passed]}
        (binding [*url* (str *url* "#prob-desc")]
          (run-code id raw-code))]
    (session/flash-put! :failing-test num-tests-passed)
    (flash-msg message url)))


  (POST "/problem/reject" [id]
    (reject-problem (Integer. id) "We didn't like your problem."))
  (POST "/problem/:id" [id code]
    (static-run-code (Integer. id) (trim-code code)))
  (POST "/rest/problem/:id" [id code]
     {:headers {"Content-Type" "application/json"}}
     (rest-run-code (Integer. id) (trim-code code)))
  (GET "/problems/rss" [] (create-feed
                           "4Clojure: Recent Problems"
                           "http://4clojure.com/problems"
