]> gitweb.factorcode.org Git - factor.git/commitdiff
webapps.wiki: print absolute urls as no-follow by default.
authorJohn Benediktsson <mrjbq7@gmail.com>
Mon, 10 Jan 2022 03:49:43 +0000 (19:49 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Mon, 10 Jan 2022 03:49:43 +0000 (19:49 -0800)
extra/webapps/wiki/wiki.factor

index 41278e339d5ce0d1184317cc5b51105726d3cca2..b22938b8d512f6eda4fda8d67bb6be6a42c3a8fe 100644 (file)
@@ -89,7 +89,9 @@ M: revision feed-entry-url id>> revision-url ;
         [
             "title" value dup latest-revision [
                 from-object
-                { wiki "view" } <chloe-content>
+                t link-no-follow? [
+                    { wiki "view" } <chloe-content>
+                ] with-variable
             ] [
                 edit-url <redirect>
             ] ?if
@@ -102,13 +104,15 @@ M: revision feed-entry-url id>> revision-url ;
 
         "id" >>rest
 
+        [ validate-integer-id ] >>init
+
         [
-            validate-integer-id
             "id" value <revision>
             select-tuple from-object
-        ] >>init
-
-        { wiki "view" } >>template
+            t link-no-follow? [
+                { wiki "view" } <chloe-content>
+            ] with-variable
+        ] >>display
 
     <article-boilerplate> ;