aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2020-07-06 01:14:25 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2020-07-07 13:10:38 +0200
commit72852f0233828a43af6fae3b27c111dcbedd8d40 (patch)
tree14e9fa46719c5fdb58d2443c93c38f55017074d4
parentExtend (vcomponent describe) to handle multi-valued fields. (diff)
downloadcalp-72852f0233828a43af6fae3b27c111dcbedd8d40.tar.gz
calp-72852f0233828a43af6fae3b27c111dcbedd8d40.tar.xz
Resolve whitespace in binary.
-rw-r--r--module/vcomponent/parse/types.scm4
-rw-r--r--module/vcomponent/parse/xcal.scm5
2 files changed, 6 insertions, 3 deletions
diff --git a/module/vcomponent/parse/types.scm b/module/vcomponent/parse/types.scm
index 552aa191..2ba9a553 100644
--- a/module/vcomponent/parse/types.scm
+++ b/module/vcomponent/parse/types.scm
@@ -12,7 +12,9 @@
(unless (string=? "BASE64" (hashq-ref props 'ENCODING))
(warning "Binary field not marked ENCODING=BASE64"))
- ;; TODO whitespace in binary?
+ ;; For icalendar no extra whitespace is allowed in a
+ ;; binary field (except for line wrapping). This differs
+ ;; from xcal.
(base64-string->bytevector value))
;; BOOLEAN
diff --git a/module/vcomponent/parse/xcal.scm b/module/vcomponent/parse/xcal.scm
index 19d7286a..513de1f2 100644
--- a/module/vcomponent/parse/xcal.scm
+++ b/module/vcomponent/parse/xcal.scm
@@ -16,8 +16,9 @@
(case type
[(binary)
- ;; TODO rfc6321 allows whitespace in binary?
- (base64-string->bytevector (car value))]
+ ;; rfc6321 allows whitespace in binary
+ (base64-string->bytevector
+ (string-delete char-set:whitespace (car value)))]
[(boolean) (string=? "true" (car value))]