Skip to content

Commit

Permalink
Merge pull request #119 from craftcms/bugfix/contact-form-escape-HTML…
Browse files Browse the repository at this point in the history
…-104

fixed #104 for v2
  • Loading branch information
angrybrad committed Mar 26, 2018
2 parents 0e3b6cb + 41191f3 commit a560481
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Mailer.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
use craft\mail\Message;
use yii\base\Component;
use yii\base\InvalidConfigException;
use yii\helpers\Html;
use yii\helpers\Markdown;

class Mailer extends Component
Expand Down Expand Up @@ -207,7 +208,8 @@ public function compileTextBody(Submission $submission): string
*/
public function compileHtmlBody(string $textBody): string
{
$html = Markdown::process($textBody);
$html = Html::encode($textBody);
$html = Markdown::process($html);

return $html;
}
Expand Down

0 comments on commit a560481

Please sign in to comment.