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)
|
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>
|
||||||
<tr title="<?= $this->translate('A comment, as entered by the author, associated with the scheduled downtime'); ?>">
|
<tr title="<?= $this->translate('A comment, as entered by the author, associated with the scheduled downtime'); ?>">
|
||||||
<th><?= $this->translate('Comment') ?></th>
|
<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>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
|
@ -66,5 +66,5 @@
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<p class="comment-text"<?php if (isset($textId)): ?> id="<?= $textId ?>"<?php endif ?>>
|
<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>
|
</p>
|
||||||
|
|
|
@ -82,6 +82,6 @@
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<p class="comment-text"<?php if (isset($textId)): ?> id="<?= $textId ?>"<?php endif ?>>
|
<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>
|
</p>
|
||||||
</td>
|
</td>
|
||||||
|
|
|
@ -182,7 +182,7 @@ $rowAction = Url::fromPath('monitoring/event/show');
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
<p class="overview-plugin-output"><?php if ($icon) {
|
<p class="overview-plugin-output"><?php if ($icon) {
|
||||||
echo $this->icon($icon, $iconTitle);
|
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
|
// TODO(ak): this allows only a[href] in messages, but plugin output allows more
|
||||||
?></p>
|
?></p>
|
||||||
</td>
|
</td>
|
||||||
|
|
|
@ -44,7 +44,7 @@ $acknowledgement = $object->acknowledgement;
|
||||||
} ?>
|
} ?>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
<?= $this->nl2br($this->createTicketLinks($this->escapeComment($acknowledgement->getComment()))) ?>
|
<?= $this->nl2br($this->createTicketLinks($this->markdown($acknowledgement->getComment()))) ?>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<?php elseif (isset($removeAckForm)): ?>
|
<?php elseif (isset($removeAckForm)): ?>
|
||||||
|
|
|
@ -68,7 +68,7 @@ if (empty($object->comments) && ! $addLink) {
|
||||||
} ?>
|
} ?>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
<?= $this->nl2br($this->createTicketLinks($this->escapeComment($comment->comment))) ?>
|
<?= $this->nl2br($this->createTicketLinks($this->markdown($comment->comment))) ?>
|
||||||
</dd>
|
</dd>
|
||||||
<?php endforeach ?>
|
<?php endforeach ?>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
|
@ -108,7 +108,7 @@ if (empty($object->comments) && ! $addLink) {
|
||||||
} ?>
|
} ?>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
<?= $this->nl2br($this->createTicketLinks($this->escapeComment($downtime->comment))) ?>
|
<?= $this->nl2br($this->createTicketLinks($this->markdown($downtime->comment))) ?>
|
||||||
</dd>
|
</dd>
|
||||||
<?php endforeach ?>
|
<?php endforeach ?>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
Loading…
Reference in New Issue