sh8email-django icon indicating copy to clipboard operation
sh8email-django copied to clipboard

Strip HTML code from email contents in API call to given user

Open hunj opened this issue 8 years ago • 4 comments

For given <username>, the GET response to https://sh8.email/rest/mail/<username>/list/ is as follows:

[
    {
        "pk": <some pk>,
        "recipient": <username>,
        "sender": <sender's email address>,
        "subject": <email subject>,
        "contents": "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Trans",
        "recipDate": <received DateTime>,
        "isSecret": false,
        "isRead": false
    }
    {
        (another email...)
    }
]

Here, the "contents" of each email is only limited to 50 characters for convenience, but allows HTML codes in them; it should return the first 50 characters from the plaintext of the email.

hunj avatar Nov 02 '17 21:11 hunj

Note: https://github.com/triplepy/sh8email-django/blob/master/rest/views.py#L23

hunj avatar Nov 02 '17 21:11 hunj

I will check this. Thanks @hunj

kyunooh avatar Nov 06 '17 04:11 kyunooh

Heck, now CSS: image

hunj avatar Nov 27 '17 18:11 hunj

What the... T.T

kyunooh avatar Nov 29 '17 00:11 kyunooh