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) ?>
|
<?= $this->link()->host($event->host_name, $event->host_display_name) ?>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
<p class="plugin-output">
|
<p class="plugin-output">
|
||||||
<?= empty($msg) ? '' : $this->escape($msg) ?>
|
<?= nl2br($this->createTicketLinks($this->escape($msg)), false) ?>
|
||||||
</p>
|
</p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -70,7 +70,7 @@ if (! $this->compact): ?>
|
||||||
$service->host_display_name
|
$service->host_display_name
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
) ?>:
|
) ?>:
|
||||||
<?php endif ?><?= $this->qlink(
|
<?php endif ?><?= $this->qlink(
|
||||||
$service->service_display_name,
|
$service->service_display_name,
|
||||||
$serviceLink,
|
$serviceLink,
|
||||||
|
|
|
@ -46,7 +46,7 @@ $acknowledgement = $object->acknowledgement;
|
||||||
</span>
|
</span>
|
||||||
</dt>
|
</dt>
|
||||||
<dd class="comment-text">
|
<dd class="comment-text">
|
||||||
<p><?= nl2br($this->createTicketLinks($acknowledgement->getComment()), false) ?></p>
|
<p><?= nl2br($this->createTicketLinks($this->escape($acknowledgement->getComment())), false) ?></p>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
</td>
|
</td>
|
||||||
|
|
|
@ -69,7 +69,7 @@ if (empty($object->comments) && ! $addLink) {
|
||||||
</span>
|
</span>
|
||||||
</dt>
|
</dt>
|
||||||
<dd class="comment-text">
|
<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>
|
</dd>
|
||||||
<?php endforeach ?>
|
<?php endforeach ?>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
|
@ -99,7 +99,7 @@ if (empty($object->comments) && ! $addLink) {
|
||||||
</span>
|
</span>
|
||||||
</dt>
|
</dt>
|
||||||
<dd class="comment-text">
|
<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>
|
</dd>
|
||||||
<?php endforeach ?>
|
<?php endforeach ?>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
Loading…
Reference in New Issue