Skip to content

Commit

Permalink
monitoring: Don't use str_replace for nl2br and escape comments befor…
Browse files Browse the repository at this point in the history
…e creating ticket links
  • Loading branch information
lippserd committed Nov 3, 2015
1 parent 55f0863 commit c0bc2e2
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
Expand Up @@ -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>
Expand Down
Expand Up @@ -70,7 +70,7 @@ if (! $this->compact): ?>
$service->host_display_name
)
)
) ?>:
) ?>&#58;
<?php endif ?><?= $this->qlink(
$service->service_display_name,
$serviceLink,
Expand Down
Expand Up @@ -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>
Expand Down
Expand Up @@ -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>
Expand Down
Expand Up @@ -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>
Expand Down

0 comments on commit c0bc2e2

Please sign in to comment.