Pre-save transforms

Pre-save transforms (PST) are transformations which the applies to the  before it is even saved. It involves the following transformations, in this order:


 * Null characters: Null characters are removed.
 * Trailing whitespace: Whitespace (according to PHP's [//php.net/rtrim rtrim]) at the end of the text is removed.
 * Line endings: Line endings  as well as   are normalized to.
 * :  becomes   becomes
 * :  becomes   becomes
 * :  becomes   becomes

Pre-save transforms are implemented in the function  of.