Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

handle $ in URLs without crashing

  • Loading branch information...
commit 5a2d238b4a3378da8be706c7bd66de4e13891e4e 1 parent 3cf5c90
Chouser authored

Showing 1 changed file with 6 additions and 4 deletions. Show diff stats Hide diff stats

  1. +6 4 irc-log-to-html.clj
10 irc-log-to-html.clj
@@ -39,9 +39,11 @@
39 39 linked (str/replace escaped link-re
40 40 (fn [url]
41 41 (let [urltext (reduce #(str %1 "<wbr />" %2)
42   - (re-seq wrap-re url))]
43   - (xhtml [:a {:href url :class "nm"}
44   - urltext]))))]
  42 + (re-seq wrap-re url))
  43 + linktext (xhtml [:a {:href url
  44 + :class "nm"}
  45 + urltext])]
  46 + (str/replace linktext "$" "\\$"))))]
45 47 (str linked "\n")))
46 48
47 49 (defn #^String html-header [date]
@@ -161,7 +163,7 @@
161 163 (update-html log-dir html-dir)))]
162 164 (sh "ln" "-sf" latest link-name)
163 165 (println (sh "rsync" "-ua" "--files-from=-" "." rsync-target
164   - :in (str/join "\n" (cons link-name html-files))))))
  166 + :in (str/join "\n" (cons link-name html-files))))))
165 167
166 168 (update-remote-html
167 169 (File. "/home/chouser/commlog/irssi/clojure")

0 comments on commit 5a2d238

Please sign in to comment.
Something went wrong with that request. Please try again.