Project: moodle
Issue MDL-42207: fix message text formatting
the message formatting code is not ok, let's cleanup this area
Story points: 8