Having exchanged a private message in moodle.org containing the verbose output of a curl CLI command, including an HTTP Redirection prevents me to read the entire message from the web, correctly sent by email as plain text.
The message from the web console (https://moodle.org/message/index.php?user=<userid1>&id=<userid2> ) appears as:
The document has moved here.
where here is linked with the URL following the Location: word, truncated to be an 83 chars string.
The curl output exchanged via PM is similar to the ones available in https://moodle.org/mod/forum/discuss.php?d=245261#p1081829.
Two issues here, the first being the most important since it prevent the user to read the same text received by email:
- line starting with <, >, * seems to be dropped: clean_text() is the culprit. Why not, before, encoding all the sensible HTML entities when the message in supposed to be plain text?
- Moodle.org have some filters to allow linkification where the MDL-41941 fix should prevent them: maybe applying the filtering chain, format_text(), should be called before applying the HTML cleaning but is already done via message_format_message_text().