Merge branch 'bugfix/word-break-in-plugin-output-10820'

refs #10820
This commit is contained in:
Eric Lippmann 2016-04-11 10:00:20 +02:00
commit e23672e483
2 changed files with 28 additions and 1 deletions

View File

@ -51,6 +51,14 @@ class Zend_View_Helper_PluginOutput extends Zend_View_Helper_Abstract
$isHtml = false;
}
$output = $this->fixLinks($output);
// Help browsers to break words in plugin output
$output = trim($output);
// Add space after comma where missing
$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
$output = preg_replace('/([^\s])([([])([^\s])/', '$1​$2$3', $output);
if (! $raw) {
if ($isHtml) {

View File

@ -78,13 +78,32 @@
font-size: @font-size-small;
}
// Plugin output in overviews
// Plugin output in detail views
.plugin-output,
// Plugin output in overvies
.overview-plugin-output {
-webkit-hyphens: auto;
-moz-hyphens: auto;
-ms-hyphens: auto;
hyphens: auto;
overflow-wrap: break-word;
word-wrap: break-word;
}
// Plugin output in overvies
.overview-plugin-output {
color: @text-color-light;
font-family: @font-family-fixed;
font-size: @font-size-small;
margin: 0;
white-space: pre-wrap;
// Long text in table cells overflows the table's width if the table's layout is not fixed.
// Thus overflow-wrap will not have any effect. But w/ the following we set a width of any value
// plus a min-width of 100% to consume the full width nonetheless which seems to always
// instruct browsers to not overflow the table. Ridiculous.
min-width: 100%;
width: 1em;
}
// Table for performance data in detail views