Commit 708d6ae4 authored by kiz_0987's avatar kiz_0987

#76627 Fix invalid html in grid block. Thanks digits and vrencianz.

parent 18807c9c
......@@ -118,17 +118,20 @@ function _gallery_block($op = 'list', $delta = 0, $edit = array()) {
// Split the images from the html so that can put each only in a <td>
$images = _gallery_split_imageblock($content);
$new_html = '<div class="gallery-grid-block"><div class="image-grid">';
$new_html .= '<table><tr>';
$new_html .= '<table>';
$col = 0;
foreach ($images as $current_image) {
if ($col == 0) {
$new_html .= '<tr>';
}
$new_html .= '<td style="text-align:center;">' . $current_image . '</td>';
$col++;
if ($col >= $num_cols) {
$col = 0;
$new_html .= '</tr><tr>';
$new_html .= '</tr>';
}
}
$new_html .= '</tr></table>';
$new_html .= '</table>';
$new_html .= '</div></div>';
$block['content'] .= $new_html;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment