Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

handle $ in URLs without crashing

  • Loading branch information...
commit 5a2d238b4a3378da8be706c7bd66de4e13891e4e 1 parent 3cf5c90
Chouser authored
Showing with 6 additions and 4 deletions.
  1. +6 −4 irc-log-to-html.clj
10 irc-log-to-html.clj
View
@@ -39,9 +39,11 @@
linked (str/replace escaped link-re
(fn [url]
(let [urltext (reduce #(str %1 "<wbr />" %2)
- (re-seq wrap-re url))]
- (xhtml [:a {:href url :class "nm"}
- urltext]))))]
+ (re-seq wrap-re url))
+ linktext (xhtml [:a {:href url
+ :class "nm"}
+ urltext])]
+ (str/replace linktext "$" "\\$"))))]
(str linked "\n")))
(defn #^String html-header [date]
@@ -161,7 +163,7 @@
(update-html log-dir html-dir)))]
(sh "ln" "-sf" latest link-name)
(println (sh "rsync" "-ua" "--files-from=-" "." rsync-target
- :in (str/join "\n" (cons link-name html-files))))))
+ :in (str/join "\n" (cons link-name html-files))))))
(update-remote-html
(File. "/home/chouser/commlog/irssi/clojure")
Please sign in to comment.
Something went wrong with that request. Please try again.