summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsostler <sbostler@gmail.com>2010-06-02 16:43:11 -0400
committersostler <sbostler@gmail.com>2010-06-02 16:43:11 -0400
commit831b3c2f5966d284fcf0438df9de14e88971428e (patch)
tree10a222350da14844986aa483a08da4c01d88ec51
parentd1c58d6d8001500cfcb296a57fb3ffdc7e05c4c9 (diff)
Restrict pic-regex to when extension comes at end or before ?
-rw-r--r--src/site.clj2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/site.clj b/src/site.clj
index 57dc4b6..6eba82b 100644
--- a/src/site.clj
+++ b/src/site.clj
@@ -558,7 +558,7 @@ FROM users u
;; http://snippets.dzone.com/posts/show/6995
(def url-regex #"(?i)^((http\:\/\/|https\:\/\/|ftp\:\/\/)|(www\.))+(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$")
-(def pic-regex #"(?i)\.(jpg|jpeg|png|gif|bmp|svg)")
+(def pic-regex #"(?i)\.(jpg|jpeg|png|gif|bmp|svg)(\?|$)")
(defn is-url? [word]
(and (re-find url-regex word)