From c94228308afe1dd6a52c0013f28353af9de76e5e Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Thu, 19 May 2016 11:37:12 +0200 Subject: [PATCH] PluginOutput: preserve character after comma refs #11728 --- modules/monitoring/application/views/helpers/PluginOutput.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/monitoring/application/views/helpers/PluginOutput.php b/modules/monitoring/application/views/helpers/PluginOutput.php index ba3013a3a..42b26baef 100644 --- a/modules/monitoring/application/views/helpers/PluginOutput.php +++ b/modules/monitoring/application/views/helpers/PluginOutput.php @@ -54,7 +54,7 @@ class Zend_View_Helper_PluginOutput extends Zend_View_Helper_Abstract // Help browsers to break words in plugin output $output = trim($output); // Add space after comma where missing - $output = preg_replace('/,[^\s]/', ', ', $output); + $output = preg_replace('/,(?=[^\s])/', ', ', $output); // Add zero width space after ')', ']', ':', '.', '_' and '-' if not surrounded by whitespaces $output = preg_replace('/([^\s])([\\)\\]:._-])([^\s])/', '$1$2​$3', $output); // Add zero width space before '(' and '[' if not surrounded by whitespaces