{"issue":{"title":"Handling malformed HTML content","user":{"login":"aidecoe","id":280467,"url":"https://api.github.com/users/aidecoe","avatar_url":"https://secure.gravatar.com/avatar/b8d61428e015030773096852315946b9?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"b8d61428e015030773096852315946b9"},"created_at":"2011-11-21T10:22:48Z","milestone":{"creator":{"login":"pazz","id":628455,"url":"https://api.github.com/users/pazz","avatar_url":"https://secure.gravatar.com/avatar/077a514eb716128a450034c4f9125402?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"077a514eb716128a450034c4f9125402"},"title":"release 0.3","created_at":"2011-12-20T09:38:09Z","open_issues":16,"state":"open","due_on":null,"closed_issues":7,"number":4,"description":"","url":"https://api.github.com/repos/pazz/alot/milestones/4"},"labels":[{"name":"feature","url":"https://api.github.com/repos/pazz/alot/labels/feature","color":"d7e102"}],"state":"open","updated_at":"2011-12-29T12:40:31Z","id":2303212,"closed_at":null,"html_url":"https://github.com/pazz/alot/issues/134","pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"body":"Some clients instead of full HTML document attach as alternative part just a HTML body - no <meta/> tags, so if non-UTF-8 encoding is used, text is displayed incorrectly. There are few solutions:\r\n\r\n1. Fix malformed document relying on `part.get_content_charset()` (in `message.py:extract_body()`) with help of [tidy] (http://tidy.sourceforge.net) or similar tool/library.\r\n2. Make using text/plain in favor of text/html configurable.\r\n3. Add toggle between text/plain and text/html for single message.\r\n\r\nBest would be to fulfill all solutions, because text/plain is not always present and malformed HTML documents are common enough.","number":134,"url":"https://api.github.com/repos/pazz/alot/issues/134","comments":17,"assignee":null},"comment":{"user":{"login":"pazz","id":628455,"url":"https://api.github.com/users/pazz","avatar_url":"https://secure.gravatar.com/avatar/077a514eb716128a450034c4f9125402?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"077a514eb716128a450034c4f9125402"},"created_at":"2011-12-29T12:40:31Z","updated_at":"2011-12-29T12:40:31Z","id":3300309,"body":"btw, testing can now display the msg raw source by pressing `h`.\r\n\r\nstrangely, when i show my testmail with `notmuch show  --format=text MYMSG\" i see the umlauts and special chars.\r\n(i tested ö and ™). The text/plain variant contains them. Moreover, the only text/html part is displayed like this:\r\n\r\n```\r\npart{ ID: 4, Content-type: text/html\r\nNon-text part: text/html\r\n```\r\nmaybe this is due to the lack of w3m on my system, which seems to be hard coded into the notmuch CLI","url":"https://api.github.com/repos/pazz/alot/issues/comments/3300309"},"action":"created"}