From f505ff7a857a15fd5c0040df1e02ffb838c30959 Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Sun, 26 Feb 2012 11:59:28 +0100 Subject: Wiki: Do not clobber WikiWords contained in URIs. --- src/mulk/benki/wiki.clj | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mulk/benki/wiki.clj b/src/mulk/benki/wiki.clj index a083247..45affee 100644 --- a/src/mulk/benki/wiki.clj +++ b/src/mulk/benki/wiki.clj @@ -20,7 +20,8 @@ (defn- tagsoup-map-text [fun tag-soup] (let [doc (org.jsoup.Jsoup/parse tag-soup) ] - (doseq [node (into [] (.select doc "*")) + (doseq [node (into [] (.select doc ":not(a):not(a *)")) + ;; XPath: //*[not(ancestor-or-self::a)] subnode (into [] (.childNodes node))] (when (instance? org.jsoup.nodes.TextNode subnode) (let [new-node (org.jsoup.nodes.Element. -- cgit v1.2.3