diff --git a/src/sbbs3/getmsg.cpp b/src/sbbs3/getmsg.cpp index fded198c8be0cb7641d82ccb8ec20eb9750369a3..06b45be38f67de0e397c6065d16fab655b430bfa 100644 --- a/src/sbbs3/getmsg.cpp +++ b/src/sbbs3/getmsg.cpp @@ -280,7 +280,9 @@ bool sbbs_t::show_msg(smb_t* smb, smbmsg_t* msg, long p_mode, post_t* post) if(p == NULL) p = txt; else - bprintf(text[MIMEDecodedPlainTextFmt], msg->charset == NULL ? "US-ASCII" : msg->charset); + bprintf(text[MIMEDecodedPlainTextFmt] + , msg->text_charset == NULL ? "unspecified (US-ASCII)" : msg->text_charset + , msg->text_subtype); } truncsp(p); SKIP_CRLF(p); diff --git a/src/sbbs3/js_msgbase.c b/src/sbbs3/js_msgbase.c index 7dd761cc4d056ccc6f0d34c5d2c717c0500fd705..2e7d89d20db131816574d7b03a0c43ac3361c1c2 100644 --- a/src/sbbs3/js_msgbase.c +++ b/src/sbbs3/js_msgbase.c @@ -1388,7 +1388,8 @@ static JSBool js_get_msg_header_resolve(JSContext *cx, JSObject *obj, jsid id) LAZY_UINTEGER_EXPAND("columns", p->msg.columns, JSPROP_ENUMERATE); LAZY_STRING_TRUNCSP_NULL("mime_version", p->msg.mime_version, JSPROP_ENUMERATE|JSPROP_READONLY); LAZY_STRING_TRUNCSP_NULL("content_type", p->msg.content_type, JSPROP_ENUMERATE|JSPROP_READONLY); - LAZY_STRING_TRUNCSP_NULL("charset", p->msg.charset, JSPROP_ENUMERATE|JSPROP_READONLY); + LAZY_STRING_TRUNCSP_NULL("text_charset", p->msg.text_charset, JSPROP_ENUMERATE|JSPROP_READONLY); + LAZY_STRING_TRUNCSP_NULL("text_subtype", p->msg.text_subtype, JSPROP_ENUMERATE|JSPROP_READONLY); /* Fixed length portion of msg header */ LAZY_UINTEGER("type", p->msg.hdr.type, JSPROP_ENUMERATE); @@ -3026,7 +3027,7 @@ static jsSyncMethodSpec js_msgbase_functions[] = { "The <i>by_offfset</i> (<tt>true</tt>) argument should only be passed when the argument following it is the numeric index-offset of the message to be " "retrieved. By default (<i>by_offset</i>=<tt>false</tt>), a numeric argument would be interpreted as the message <i>number</i> to be retrieved." "<br>" - "After reading/parsing MIME plain-text, a new <i>charset</i> header property (string) may be available to reflect the content-type 'charset' value." + "After reading a multi-part MIME-encoded message, new header properties may be available: <i>text_charset</i> and <i>text_subtype</i>." ) ,310 }, @@ -3101,7 +3102,6 @@ static jsSyncMethodSpec js_msgbase_functions[] = { "<tr><td align=top><tt>replyto_list</tt><td>Comma-separated list of mailboxes to reply-to, RFC822-style" "<tr><td align=top><tt>mime-version</tt><td>MIME Version (optional)" "<tr><td align=top><tt>content-type</tt><td>MIME Content-Type (optional)" - "<tr><td align=top><tt>charset</tt><td>MIME plain-text charset value (optional)" "<tr><td align=top><tt>summary</tt><td>Message Summary (optional)" "<tr><td align=top><tt>tags</tt><td>Message Tags (space-delimited, optional)" "<tr><td align=top><tt>id</tt><td>Message's RFC-822 compliant Message-ID" diff --git a/src/sbbs3/text_defaults.c b/src/sbbs3/text_defaults.c index db1d5c951ec1948534fff76f87d02c0b1da39ea3..a8bfb4effaf63adb3de0a698982d34b8a019dd9f 100644 --- a/src/sbbs3/text_defaults.c +++ b/src/sbbs3/text_defaults.c @@ -1314,8 +1314,8 @@ const char * const text_defaults[TOTAL_TEXT]={ "\x01\x77" // 795 SPAMVisibilityIsNow ,"\x0d\x0a\x54\x6f\x20\x76\x6f\x74\x65\x20\x69\x6e\x20\x74\x68\x69\x73\x20\x70\x6f\x6c\x6c\x2c\x20\x68\x69\x74\x20\x7e\x56\x20\x6e" "\x6f\x77\x2e\x0d\x0a" // 796 VoteInThisPollNow - ,"\x01\x6e\x01\x6d\x4d\x49\x4d\x45\x2d\x64\x65\x63\x6f\x64\x65\x64\x20\x25\x73\x20\x70\x6c\x61\x69\x6e\x2d\x74\x65\x78\x74\x3a\x01" - "\x6e\x0d\x0a" // 797 MIMEDecodedPlainTextFmt + ,"\x01\x6e\x01\x6d\x4d\x49\x4d\x45\x2d\x64\x65\x63\x6f\x64\x65\x64\x20\x25\x73\x20\x25\x73\x2d\x74\x65\x78\x74\x3a\x01\x6e\x0d\x0a" + "" // 797 MIMEDecodedPlainTextFmt ,"\x01\x2f\x40\x45\x58\x45\x43\x3a\x53\x48\x4f\x57\x4d\x53\x47\x41\x56\x41\x54\x41\x52\x40\x0d\x0a" // 798 MsgHdrBodySeparator ,"\x01\x2f\x0d\x0a\x40\x45\x58\x45\x43\x3a\x53\x48\x4f\x57\x46\x49\x4c\x45\x41\x56\x41\x54\x41\x52\x40" // 799 FileHdrDescSeparator ,"\x52\x65\x6d\x6f\x76\x65\x20\x66\x69\x6c\x65" // 800 RemoveFileQ