monitoring: Don't use str_replace for nl2br and escape comments before creating ticket links
This commit is contained in:
parent
55f0863649
commit
c0bc2e267e
|
@ -92,7 +92,7 @@ if (! $this->compact): ?>
|
|||
<?= $this->link()->host($event->host_name, $event->host_display_name) ?>
|
||||
<?php endif ?>
|
||||
<p class="plugin-output">
|
||||
<?= empty($msg) ? '' : $this->escape($msg) ?>
|
||||
<?= nl2br($this->createTicketLinks($this->escape($msg)), false) ?>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -70,7 +70,7 @@ if (! $this->compact): ?>
|
|||
$service->host_display_name
|
||||
)
|
||||
)
|
||||
) ?>:
|
||||
) ?>:
|
||||
<?php endif ?><?= $this->qlink(
|
||||
$service->service_display_name,
|
||||
$serviceLink,
|
||||
|
|
|
@ -46,7 +46,7 @@ $acknowledgement = $object->acknowledgement;
|
|||
</span>
|
||||
</dt>
|
||||
<dd class="comment-text">
|
||||
<p><?= nl2br($this->createTicketLinks($acknowledgement->getComment()), false) ?></p>
|
||||
<p><?= nl2br($this->createTicketLinks($this->escape($acknowledgement->getComment())), false) ?></p>
|
||||
</dd>
|
||||
</dl>
|
||||
</td>
|
||||
|
|
|
@ -69,7 +69,7 @@ if (empty($object->comments) && ! $addLink) {
|
|||
</span>
|
||||
</dt>
|
||||
<dd class="comment-text">
|
||||
<?= str_replace(array('\r\n', '\n'), '<br>', $this->createTicketLinks($comment->comment)) ?>
|
||||
<p><?= nl2br($this->createTicketLinks($this->escape($comment->comment)), false) ?></p>
|
||||
</dd>
|
||||
<?php endforeach ?>
|
||||
</dl>
|
||||
|
|
|
@ -99,7 +99,7 @@ if (empty($object->comments) && ! $addLink) {
|
|||
</span>
|
||||
</dt>
|
||||
<dd class="comment-text">
|
||||
<p><?= str_replace(array('\r\n', '\n'), '<br>', $this->createTicketLinks($downtime->comment)) ?></p>
|
||||
<p><?= nl2br($this->createTicketLinks($this->escape($downtime->comment)), false) ?></p>
|
||||
</dd>
|
||||
<?php endforeach ?>
|
||||
</dl>
|
||||
|
|
Loading…
Reference in New Issue