From 2ee958354c18d91a8bd44028042bb4a4a10c423a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Mon, 26 Oct 2020 20:30:22 +0100 Subject: HTML Prettyify code for following tags. --- module/calp/html/vcomponent.scm | 11 ++++++++--- module/calp/util/config.scm | 4 ---- module/vcomponent/search.scm | 2 +- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/module/calp/html/vcomponent.scm b/module/calp/html/vcomponent.scm index 208b66f7..6b9a48e9 100644 --- a/module/calp/html/vcomponent.scm +++ b/module/calp/html/vcomponent.scm @@ -5,6 +5,7 @@ :use-module (srfi srfi-41) :use-module (datetime) :use-module ((text util) :select (add-enumeration-punctuation)) + :use-module ((web uri-query) :select (encode-query-parameters)) :use-module (calp html util) :use-module ((calp html config) :select (edit-mode)) :use-module ((calp html components) :select (btn tabset form with-label)) @@ -117,9 +118,13 @@ ,@(map (lambda (c) `(a (@ (class "category") ;; TODO centralize search terms - ;; TODO propper stringifycation of sexp - (href ,(format #f "/search/?q=%28member+%22~a%22%0D%0A++%28or+%28prop+event+%27CATEGORIES%29+%27%28%29%29%0D%0A" - c))) + (href + "/search/?" + ,(encode-query-parameters + `((q . (member + ,(->quoted-string c) + (or (prop event 'CATEGORIES) + '()))))))) ,c)) it))) diff --git a/module/calp/util/config.scm b/module/calp/util/config.scm index 32dabb69..fbe35d59 100644 --- a/module/calp/util/config.scm +++ b/module/calp/util/config.scm @@ -106,10 +106,6 @@ (export format-procedure) -(define (->str any) - (with-output-to-string - (lambda () (display any)))) - (define-public (get-configuration-documentation) (define groups (group-by (compose source-module car) diff --git a/module/vcomponent/search.scm b/module/vcomponent/search.scm index 27483720..39a3847a 100644 --- a/module/vcomponent/search.scm +++ b/module/vcomponent/search.scm @@ -70,7 +70,7 @@ (eval `(lambda (event) ,@expressions) (make-sandbox-module `( - ((vcomponent base) prop param children type) + ((vcomponent base) prop param children type parent) ((ice-9 regex) string-match) ,@(bindings-for '(datetime)) ,@all-pure-bindings) -- cgit v1.2.3