Features to be implemented in the MVP, for T130490
- Implement very basic plain text to HTML conversions:
- Use nl2br to convert newlines to <br/> tags
- Include links in <a> tags. Account for links being in brackets (()), in quotes (‘’ or “”) and any other format that we find people tend to mention links in plain text.
- In order to reduce redundancy and allowing extensions to reuse/alter their existing HTML email support, a new global $wgCoreHTMLEmail could be added to allow Wiki Administrators to send plain text emails if they want to (send plain text email if $wgCoreHTMLEmail is set to false, and send multipart email if it is true) , besides $wgAllowHTMLEmail, which decides whether the Wiki allows anybody (core or extension) to send an HTML Email. To explain the different cases more clearly,
- if ($wgAllowHTMLEmail == false) only plain text emails go
- if ($wgAllowHTMLEmail == true and $wgCoreHTMLEmail == false) Anybody *except core* can send an HTML email.
- if ($wgAllowHTMLEmail == true and $wgCoreHTMLEmail == true) Everybody can and core *will* send an HTML email.
- The server will send emails to the client depending upon user preferences:
- The user will be given a “Receive plain text email only” option in Special:Preferences. When this is ticked, the server will send only plain text emails to that specific user.
- When the above option is unticked, the server will send a multipart email (both HTML and plain text) when both $wgAllowHTMLEmail and $wgCoreHTMLEmail are set to true.
- Translation: When generating a key to be passed to wfMessage(), it will be assumed that if the key does not end with -html, the text is wikitext/plaintext. If the caller of the function wishes to include html in the text, the key must be appended by -html.