From 831b3c2f5966d284fcf0438df9de14e88971428e Mon Sep 17 00:00:00 2001 From: sostler Date: Wed, 2 Jun 2010 16:43:11 -0400 Subject: Restrict pic-regex to when extension comes at end or before ? --- src/site.clj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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) -- cgit v1.2.3-70-g09d2