about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMorgan Astra <m@morganastra.me>2016-01-23 15:55:21 -0800
committerMorgan Astra <m@morganastra.me>2016-01-23 15:55:21 -0800
commite5a03f52603a815e5308ce901e88cc662a8c0017 (patch)
treefd1656a160d2d470e65924bcaeeb92c2c79e5d6c
parentd7c898afbafebd608fd14ee2c27e98f44fec0415 (diff)
html-escape path before parsing as pronoun string fixes #28
-rwxr-xr-xquickstart.sh3
-rw-r--r--src/pronouns/pages.clj5
2 files changed, 4 insertions, 4 deletions
diff --git a/quickstart.sh b/quickstart.sh
index c50fb02..8969778 100755
--- a/quickstart.sh
+++ b/quickstart.sh
@@ -1,6 +1,5 @@
 #!/bin/sh
 
-export port=$1
+export PORT=6666
 lein uberjar
-open http://localhost:"$port"/ze/zir
 java -cp target/pronouns-standalone.jar clojure.main -m pronouns.web
diff --git a/src/pronouns/pages.clj b/src/pronouns/pages.clj
index ae31e0c..3e63437 100644
--- a/src/pronouns/pages.clj
+++ b/src/pronouns/pages.clj
@@ -1,7 +1,8 @@
 (ns pronouns.pages
   (:require [clojure.string :as s]
             [pronouns.util :as u]
-            [hiccup.core :refer :all]))
+            [hiccup.core :refer :all]
+            [hiccup.util :refer [escape-html]]))
 
 (defn wrap-pronoun
   [pronoun]
@@ -121,7 +122,7 @@
        "https://github.com/witch-house/pronoun.is/blob/master/resources/pronouns.tab"))
 
 (defn pronouns [path pronouns-table]
-  (let [pronouns (parse-pronouns-with-lookup path pronouns-table)]
+  (let [pronouns (parse-pronouns-with-lookup (escape-html path) pronouns-table)]
     (if pronouns
       (apply format-pronoun-examples pronouns)
       (not-found))))