monitoring: Transform markdown markup in comments
refs #3684 refs #3441
This commit is contained in:
parent
1ac5557187
commit
d4cf7a8ec4
|
@ -136,7 +136,7 @@ class EventController extends Controller
|
|||
*/
|
||||
protected function comment($message)
|
||||
{
|
||||
return $this->view->nl2br($this->view->createTicketLinks($this->view->escapeComment($message)));
|
||||
return $this->view->nl2br($this->view->createTicketLinks($this->view->markdown($message)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
</tr>
|
||||
<tr title="<?= $this->translate('A comment, as entered by the author, associated with the scheduled downtime'); ?>">
|
||||
<th><?= $this->translate('Comment') ?></th>
|
||||
<td class="comment-text"><?= $this->nl2br($this->escapeComment($this->downtime->comment)) ?></td>
|
||||
<td class="comment-text"><?= $this->nl2br($this->markdown($this->downtime->comment)) ?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
|
@ -66,5 +66,5 @@
|
|||
</span>
|
||||
</div>
|
||||
<p class="comment-text"<?php if (isset($textId)): ?> id="<?= $textId ?>"<?php endif ?>>
|
||||
<?= $this->nl2br($this->escapeComment($comment->comment)) ?>
|
||||
<?= $this->nl2br($this->markdown($comment->comment)) ?>
|
||||
</p>
|
||||
|
|
|
@ -82,6 +82,6 @@
|
|||
</span>
|
||||
</div>
|
||||
<p class="comment-text"<?php if (isset($textId)): ?> id="<?= $textId ?>"<?php endif ?>>
|
||||
<?= $this->nl2br($this->escapeComment($downtime->comment)) ?>
|
||||
<?= $this->nl2br($this->markdown($downtime->comment)) ?>
|
||||
</p>
|
||||
</td>
|
||||
|
|
|
@ -182,7 +182,7 @@ $rowAction = Url::fromPath('monitoring/event/show');
|
|||
<?php endif ?>
|
||||
<p class="overview-plugin-output"><?php if ($icon) {
|
||||
echo $this->icon($icon, $iconTitle);
|
||||
} ?><?= $this->nl2br($this->createTicketLinks($this->escapeComment($msg)))
|
||||
} ?><?= $this->nl2br($this->createTicketLinks($this->markdown($msg)))
|
||||
// TODO(ak): this allows only a[href] in messages, but plugin output allows more
|
||||
?></p>
|
||||
</td>
|
||||
|
|
|
@ -44,7 +44,7 @@ $acknowledgement = $object->acknowledgement;
|
|||
} ?>
|
||||
</dt>
|
||||
<dd>
|
||||
<?= $this->nl2br($this->createTicketLinks($this->escapeComment($acknowledgement->getComment()))) ?>
|
||||
<?= $this->nl2br($this->createTicketLinks($this->markdown($acknowledgement->getComment()))) ?>
|
||||
</dd>
|
||||
</dl>
|
||||
<?php elseif (isset($removeAckForm)): ?>
|
||||
|
|
|
@ -68,7 +68,7 @@ if (empty($object->comments) && ! $addLink) {
|
|||
} ?>
|
||||
</dt>
|
||||
<dd>
|
||||
<?= $this->nl2br($this->createTicketLinks($this->escapeComment($comment->comment))) ?>
|
||||
<?= $this->nl2br($this->createTicketLinks($this->markdown($comment->comment))) ?>
|
||||
</dd>
|
||||
<?php endforeach ?>
|
||||
</dl>
|
||||
|
|
|
@ -108,7 +108,7 @@ if (empty($object->comments) && ! $addLink) {
|
|||
} ?>
|
||||
</dt>
|
||||
<dd>
|
||||
<?= $this->nl2br($this->createTicketLinks($this->escapeComment($downtime->comment))) ?>
|
||||
<?= $this->nl2br($this->createTicketLinks($this->markdown($downtime->comment))) ?>
|
||||
</dd>
|
||||
<?php endforeach ?>
|
||||
</dl>
|
||||
|
|
Loading…
Reference in New Issue