diff options
Diffstat (limited to 'users/sterni/mblog/note.lisp')
-rw-r--r-- | users/sterni/mblog/note.lisp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/users/sterni/mblog/note.lisp b/users/sterni/mblog/note.lisp index 21257fc7b4..f056aaa72d 100644 --- a/users/sterni/mblog/note.lisp +++ b/users/sterni/mblog/note.lisp @@ -1,18 +1,15 @@ ;; SPDX-License-Identifier: GPL-3.0-only -;; SPDX-FileCopyrightText: Copyright (C) 2022 by sterni +;; SPDX-FileCopyrightText: Copyright (C) 2022-2023 by sterni (in-package :note) (declaim (optimize (safety 3))) ;;; util -;; TODO(sterni): merge this with mblog::*copy-buffer-size* -(defvar *copy-buffer-size* 4096) - (defun html-escape-stream (in out) "Escape characters read from stream IN and write them to stream OUT escaped using WHO:ESCAPE-STRING-MINIMAL." - (let ((buf (make-string *copy-buffer-size*))) + (let ((buf (make-string config:*general-buffer-size*))) (loop for len = (read-sequence buf in) while (> len 0) do (write-string (who:escape-string-minimal (subseq buf 0 len)) out)))) @@ -104,7 +101,7 @@ ;; notemap creates text/plain notes we need to handle properly. ;; Additionally we *could* check X-Mailer which notemap sets ((string-equal (apple-note-mime-subtype note) "plain") - (html-escape-stream (mime:mime-body-stream text :binary nil) out)) + (html-escape-stream (mime:mime-body-stream text) out)) ;; Notes.app creates text/html parts ((string-equal (apple-note-mime-subtype note) "html") (closure-html:parse |