diff --git a/vcarded.scm b/vcarded.scm index 285cd45..f9769c3 100644 --- a/vcarded.scm +++ b/vcarded.scm @@ -69,6 +69,7 @@ (uri:uri-reference string)) + ;; Parse a data URI’s contents into a list containing the mimetype (string) ;; and bytevector contents (u8vector). ;; "data:text/plain;base64,ZGFk" → ("text/plain;base64" #u8(100 97 100)) @@ -123,7 +124,10 @@ ;; string-form… as best we can. (define (serialize-uri-prop-value value) (cond [(uri:uri? value) - (uri:uri->string value)] + (irregex-replace + ":./" + (uri:uri->string value) + ":")] ;; Some URIs have “./” mistakenly prepended. [(list? value) (bytevector->data-uri-str (car value) (cadr value))] [(string? value)