ponymail-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject [incubator-ponymail] branch master updated: Enh: Ensure non-printable chars are not lost ...
Date Tue, 09 Oct 2018 17:45:12 GMT
This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail.git


The following commit(s) were added to refs/heads/master by this push:
     new 66862d3  Enh: Ensure non-printable chars are not lost ...
66862d3 is described below

commit 66862d30316df872bb29dcf544c0e38aa008b0f0
Author: Sebb <sebb@apache.org>
AuthorDate: Tue Oct 9 18:45:10 2018 +0100

    Enh: Ensure non-printable chars are not lost ...
    
    ... in source and mbox output (#476)
---
 CHANGELOG.md        | 1 +
 site/api/mbox.lua   | 2 +-
 site/api/source.lua | 2 +-
 3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9d0140b..5ad7760 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,5 @@
 ## Changes in 0.11-SNAPSHOT
+- Enh: Ensure non-printable chars are not lost in source and mbox output (#476)
 - Enh: display buttons even if no mails are found in a month (#470)
 - Bug: Javascript URLs must always use URL_BASE (#469)
 - Bug: setup.py uses ES library version to decide what features the database supports (#464)
diff --git a/site/api/mbox.lua b/site/api/mbox.lua
index c485204..780f242 100644
--- a/site/api/mbox.lua
+++ b/site/api/mbox.lua
@@ -141,7 +141,7 @@ function handle(r)
                         checkFirst=true
                         -- TODO consider whether to optionally prefix '>From ', '^>>From
' etc. 
                         -- If so, just change the RE to "^>*From "
-                        r:puts(line) -- original line
+                        r:write(line) -- original line
                     end
                     r:puts("\n")
                 end
diff --git a/site/api/source.lua b/site/api/source.lua
index 5de4dec..9794694 100644
--- a/site/api/source.lua
+++ b/site/api/source.lua
@@ -46,7 +46,7 @@ function handle(r)
         if aaa.canAccessDoc(r, doc, account) then
             local doc_raw = elastic.get('mbox_source', doc.request_id)
             if doc_raw then
-                r:puts(doc_raw.source)
+                r:write(doc_raw.source)
             else
                 r:puts("Could not find the email source, sorry!")
             end


Mime
View raw message