diff options
author | Hugo Hรถrnquist <hugo@lysator.liu.se> | 2022-06-12 03:12:06 +0200 |
---|---|---|
committer | Hugo Hรถrnquist <hugo@lysator.liu.se> | 2022-06-13 12:08:44 +0200 |
commit | d24c78628003c114c9f37f9203a7de09d8c883d6 (patch) | |
tree | fe4afd368fc5fade3e2809cb14865b5f225bb85a /module | |
parent | Remove with-label. (diff) | |
download | calp-d24c78628003c114c9f37f9203a7de09d8c883d6.tar.gz calp-d24c78628003c114c9f37f9203a7de09d8c883d6.tar.xz |
Escape some unicode in initial xhtml output.
While not necessary, since both HTML and XHTML allows for direct UTF-8,
the validator fails on it.
Diffstat (limited to 'module')
-rw-r--r-- | module/calp/html/vcomponent.scm | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/module/calp/html/vcomponent.scm b/module/calp/html/vcomponent.scm index 85c3829c..b7702de1 100644 --- a/module/calp/html/vcomponent.scm +++ b/module/calp/html/vcomponent.scm @@ -28,6 +28,12 @@ ) +(define (xml-entities s) + (lambda () + (for-each display + (map (lambda (c) (format #f "&#x~x;" (char->integer c))) + (string->list s))))) + (define-public (format-summary ev str) ((summary-filter) ev str)) @@ -595,20 +601,20 @@ (title ,(_ "Fullscreen")) ;; (aria-label "") ) - "๐") + ,(xml-entities "๐")) (button (@ (class "remove-button") ;; Remove/Trash the event this popup represent ;; Think garbage can (title ,(_ "Remove"))) - "๐")) + ,(xml-entities "๐"))) (tab-group (@ (class "window-body")) (vevent-description - (@ (data-label "๐
") (data-title ,(_ "Overview")) + (@ (data-label ,(xml-entities "๐
")) (data-title ,(_ "Overview")) (class "vevent"))) (vevent-edit - (@ (data-label "๐") + (@ (data-label ,(xml-entities "๐")) (data-title ,(_ "Edit")) ;; Used by JavaScript to target this tab (data-originaltitle "Edit"))) @@ -617,10 +623,10 @@ ;; (@ (data-label "โบ") (data-title "Upprepningar"))) (vevent-changelog - (@ (data-label "๐") + (@ (data-label ,(xml-entities "๐")) (data-title ,(_ "Changelog")))) ,@(when (debug) `((vevent-dl - (@ (data-label "๐ธ") + (@ (data-label ,(xml-entities "๐ธ")) (data-title ,(_ "Debug")))))))))) |