mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-22 13:30:55 +01:00
Put cows and figlet bannners in <pre> in HTML mail bodies
Summary: Fixes T9538. Ref T9408. `cowsay` and `figlet` Remarkup rules are being mangled in HTML mail right now. Put them in <pre> to unmangle them. Test Plan: Sent myself a cow + figlet in mail. Used `bin/mail show-outbound --id ... --dump-html > dump.html` + open that HTML file in Safari to preview HTML mail. Saw linebreaks and monospaced formatting. Reviewers: chad Reviewed By: chad Maniphest Tasks: T9538, T9408 Differential Revision: https://secure.phabricator.com/D14248
This commit is contained in:
parent
2a355d8548
commit
5a874ba0a8
2 changed files with 14 additions and 2 deletions
|
@ -28,10 +28,16 @@ final class PhabricatorRemarkupCowsayBlockInterpreter
|
|||
->setText($content)
|
||||
->renderCow();
|
||||
|
||||
if ($this->getEngine()->isTextMode()) {
|
||||
$engine = $this->getEngine();
|
||||
|
||||
if ($engine->isTextMode()) {
|
||||
return $result;
|
||||
}
|
||||
|
||||
if ($engine->isHTMLMailMode()) {
|
||||
return phutil_tag('pre', array(), $result);
|
||||
}
|
||||
|
||||
return phutil_tag(
|
||||
'div',
|
||||
array(
|
||||
|
|
|
@ -27,10 +27,16 @@ final class PhabricatorRemarkupFigletBlockInterpreter
|
|||
|
||||
$result = $figlet->lineEcho($content);
|
||||
|
||||
if ($this->getEngine()->isTextMode()) {
|
||||
$engine = $this->getEngine();
|
||||
|
||||
if ($engine->isTextMode()) {
|
||||
return $result;
|
||||
}
|
||||
|
||||
if ($engine->isHTMLMailMode()) {
|
||||
return phutil_tag('pre', array(), $result);
|
||||
}
|
||||
|
||||
return phutil_tag(
|
||||
'div',
|
||||
array(
|
||||
|
|
Loading…
Reference in a new issue