public function generate()
{
$this->text = \StringUtil::toHtml5($this->text);
// Add the static files URL to images
if (TL_FILES_URL != '') {
$path = \Config::get('uploadPath') . '/';
$this->text = str_replace(' src="' . $path, ' src="' . TL_FILES_URL . $path, $this->text);
}
return \StringUtil::encodeEmail($this->text);
}