Skip to content

Commit 87f800c

Browse files
committed
custom fields display bugfix
1 parent abdda7b commit 87f800c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

issue.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -188,20 +188,20 @@
188188
$customs = array();
189189
foreach ( $user->custom_field_ids as $cfName => $cfKey ) {
190190
if ( $value = @$issue->renderedFields->$cfKey ) {
191-
$customs[$cfName] = $issue->renderedFields->$cfKey;
191+
$customs[$cfName] = print_r($value, 1);
192192
}
193193
else if ( $value = @$fields->$cfKey ) {
194-
$customs[$cfName] = nl2br(html(trim(implode("\n", (array)$value))));
194+
$customs[$cfName] = print_r($value, 1);
195195
}
196196
}
197197

198198
if ( $customs ) {
199199
echo '<h2 class="visiblity-toggle-header open"><a id="custom-fields-toggler" href="#">' . count($customs) . ' custom fields</a></h2>';
200200
echo '<div class="custom-fields">';
201-
foreach ($customs as $cfName => $html) {
201+
foreach ($customs as $cfName => $text) {
202202
echo '<div class="custom-field">';
203203
echo '<h3 class="custom-field-title">' . html($cfName) . '</h3>';
204-
echo '<div class="custom-field-value">' . $html . '</div>';
204+
echo '<div class="custom-field-value"><pre style="margin: 0">' . html(trim($text)) . '</pre></div>';
205205
echo '</div>';
206206
}
207207
echo '</div>';

0 commit comments

Comments
 (0)