explanation

This commit is contained in:
Shish 2020-02-01 20:01:25 +00:00
parent 43ea7fb70c
commit 1b4d06c8d2

View File

@ -273,6 +273,9 @@ class TextFormattingEvent extends Event
public function __construct(string $text)
{
parent::__construct();
// We need to escape before formatting, instead of at display time,
// because formatters will add their own HTML tags into the mix and
// we don't want to escape those.
$h_text = html_escape(trim($text));
$this->original = $h_text;
$this->formatted = $h_text;