aboutsummaryrefslogtreecommitdiff
path: root/module/calp/html/view/calendar/week.scm
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2022-06-11 23:17:14 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2022-06-12 00:08:17 +0200
commitfb38f4ba7b1711d436c303f9de34c8c34f29168c (patch)
treeb250b7a25c21df0cabae5a7711e33947228baf6a /module/calp/html/view/calendar/week.scm
parentAdd <!DOCTYPE html> to xhtml-doc macro. (diff)
downloadcalp-fb38f4ba7b1711d436c303f9de34c8c34f29168c.tar.gz
calp-fb38f4ba7b1711d436c303f9de34c8c34f29168c.tar.xz
Embedd fragile strings in sxml in procedures.
Since procedures allow direct controll of the output. Everything worked fine for XML output, but HTML encodes apostrophes as &apos;, which works really bad in script tags.
Diffstat (limited to '')
-rw-r--r--module/calp/html/view/calendar/week.scm2
1 files changed, 1 insertions, 1 deletions
diff --git a/module/calp/html/view/calendar/week.scm b/module/calp/html/view/calendar/week.scm
index 16337102..b68184f9 100644
--- a/module/calp/html/view/calendar/week.scm
+++ b/module/calp/html/view/calendar/week.scm
@@ -27,7 +27,7 @@
(define*-public (render-calendar key: calendars events start-date end-date #:allow-other-keys)
(let* ((long-events short-events (partition long-event? (stream->list (events-between start-date end-date events))))
(range (date-range start-date end-date)))
- `((script "window.VIEW='week';")
+ `((script ,(lambda () (format #t "window.VIEW='week';")))
(div (@ (class "calendar"))
(div (@ (class "days"))
;; Top left area