Skip to content

Commit

Permalink
Merge pull request #3622 from Icinga/fix/plugin-output-extra-spaces
Browse files Browse the repository at this point in the history
Fix extra spaces in command outputs after a comma
  • Loading branch information
lippserd authored Nov 21, 2018
2 parents 1353c85 + cd19625 commit 63cb9d7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions modules/monitoring/application/views/helpers/PluginOutput.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,9 @@ public function pluginOutput($output, $raw = false, $command = null)
$isHtml = false;
}
$output = trim($output);
// Add space after comma where missing, to help browsers to break words in plugin output
$output = preg_replace('/,(?=[^\s])/', ', ', $output);
// Add zero-width space after commas which are not followed by a whitespace character
// in oder to help browsers to break words in plugin output
$output = preg_replace('/,(?=[^\s])/', ',​', $output);
if (! $raw) {
if ($isHtml) {
$output = $this->processHtml($output);
Expand Down

0 comments on commit 63cb9d7

Please sign in to comment.