mime.php
This contains the functions necessary to detect and decode MIME messages.
Decodes encoded message body
This function decodes the body depending on the encoding type. Currently quoted-printable and base64 encodings are supported. decode_body hook was added to this function in 1.4.2/1.5.0
Decodes headers
This functions decode strings that is encoded according to RFC1522 (MIME Part Two: Message Header Extensions for Non-ASCII Text). Patched by Christian Schmidt <[email protected]> 23/03/2002
Encodes header
Function uses XTRA_CODE _encodeheader function, if such function exists.
Function uses Q encoding by default and encodes a string according to RFC 1522 for use in headers if it contains 8-bit characters or anything that looks like it should be encoded.
Function switches to B encoding and encodeHeaderBase64() function, if string is 8bit and multibyte character set supported by mbstring extension is used. It can cause E_USER_NOTICE errors, if interface is used with multibyte character set unsupported by mbstring extension.
Encodes string according to rfc2047 B encoding header formating rules
It is recommended way to encode headers with character sets that store symbols in more than one byte.
Function requires mbstring support. If required mbstring functions are missing, function returns false and sets E_USER_WARNING level error message.
Minimal requirements - php 4.0.6 with mbstring extension. Please note, that mbstring functions will generate E_WARNING errors, if unsupported character set is used. mb_encode_mimeheader function provided by php mbstring extension is not used in order to get better control of header encoding.
Used php code functions - function_exists(), trigger_error(), strlen() (is used with charset names and base64 strings). Used php mbstring functions - mb_strlen and mb_substr.
Related documents: rfc 2045 (BASE64 encoding), rfc 2047 (mime header encoding), rfc 2822 (header folding)
Displays attachment links and information
Since 1.3.0 function is not included in formatBody() call.
Since 1.0.2 uses attachment $type0/$type1 hook. Since 1.2.5 uses attachment $type0/* hook. Since 1.5.0 uses attachments_bottom hook. Since 1.5.2 uses templates and does *not* return a value.
This returns a parsed string called $body. That string can then be displayed as the actual message in the HTML. It contains everything needed, including HTML Tags, Attachments at the bottom, etc.
Since 1.2.0 function uses message_body hook. Till 1.3.0 function included output of formatAttachments().
This is a wrapper function to call html sanitizing routines.
Get the MIME structure
This function gets the structure of a message and stores it in the "message" class. It will return this object for use with all relevant header information and fully parsed into the standard "message" object format.
function SendDownloadHeaders - send file to the browser
Original Source: SM core src/download.php moved here to make it available to other code, and separate front end from back end functionality.
This function changes the <body> tag into a <div> tag since we can't really have a body-within-body.
A small helper function to use with array_walk. Modifies a by-ref value and makes it lowercase.
This function converts cid: url's into the ones that can be viewed in the browser.
Translates entities into literal values so they can be checked.
This function checks attribute values for entity-encoded values and returns them translated into 8-bit strings so we can run checks on them.
This function takes a PCRE-style regexp and tries to match it within the string.
This function looks for the next character within a string. It's really just a glorified "strpos", except it catches if failures nicely.
This function runs various checks against the attributes.
This function edits the style definition to make them friendly and usable in SquirrelMail.
This function looks for the next tag.
This is the main function and the one you should actually be calling.
There are several variables you should be aware of an which need special description.
Since the description is quite lengthy, see it here: http://linux.duke.edu/projects/mini/htmlfilter/
This function skips any whitespace from the current position within a string and to the next non-whitespace value.
This function returns the final tag out of the tag name, an array of attributes, and the type of the tag. This function is called by sq_sanitize internally.
Kill any tabs, newlines, or carriage returns. Our friends the makers of the browser with 95% market value decided that it'd be funny to make "java[tab]script" be just as good as "javascript".
Documentation generated on Sat, 07 Oct 2006 16:12:30 +0300 by phpDocumentor 1.3.0RC6