imh

Check-in [e2b80c29fe]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Defend against non-ASCII input
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | master | trunk
Files: files | file ages | folders
SHA3-256:e2b80c29fe7300f7152ad33f6db73596c32fcd5b2e2c9247951ee2a9cba802b9
User & Date: ajv-899-334-8894@vsta.org 2016-11-21 01:02:43
Context
2016-11-22
22:19
Fail back to "now" on un-parseable header date/time check-in: b658d08d61 user: ajv-899-334-8894@vsta.org tags: master, trunk
2016-11-21
01:02
Defend against non-ASCII input check-in: e2b80c29fe user: ajv-899-334-8894@vsta.org tags: master, trunk
2016-11-19
23:08
Add forw command link check-in: e9235c9be2 user: ajv-899-334-8894@vsta.org tags: master, trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to show.py.

1
2
3
4
5
6

7
8
9
10
11
12
13
..
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/usr/bin/python
# show.py
#       Display email message(s) using imap
#
import os
import imh


class Show(imh.IMH_mixin):

    # Fetch textual representation of this message
    def text(self, m):
        self.select_msg(m)

................................................................................
        f.write("From: %s\n" % (fields.get("From", "(no sender)"),))
        f.write("To: %s\n" % (fields.get("To", "(no recipient)"),))
        if "Cc" in fields:
            f.write("Cc: %s\n" % (fields["Cc"],))
        if "Subject" in fields:
            f.write("Subject: %s\n" % (fields["Subject"],))
        f.write("\n")
        f.write(t)
        f.close()
        return fn

    # Select folder and/or messages
    # (This can be subclassed to leverage our display logic.)
    def which_msgs(self):
        return self.arg_msgs()






>







 







|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
..
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/usr/bin/python
# show.py
#       Display email message(s) using imap
#
import os
import imh
from chore import utils

class Show(imh.IMH_mixin):

    # Fetch textual representation of this message
    def text(self, m):
        self.select_msg(m)

................................................................................
        f.write("From: %s\n" % (fields.get("From", "(no sender)"),))
        f.write("To: %s\n" % (fields.get("To", "(no recipient)"),))
        if "Cc" in fields:
            f.write("Cc: %s\n" % (fields["Cc"],))
        if "Subject" in fields:
            f.write("Subject: %s\n" % (fields["Subject"],))
        f.write("\n")
        f.write(utils.uncharenc(t))
        f.close()
        return fn

    # Select folder and/or messages
    # (This can be subclassed to leverage our display logic.)
    def which_msgs(self):
        return self.arg_msgs()