Views strips HTML from content when grouping fields in columns in Table Format

Created on 1 November 2016, almost 8 years ago
Updated 2 May 2024, 4 months ago

I just noticed that when I select a table format, and seek to group one or more fields into a single column, that the content from the field being grouped is stripped of all HTML. It would be nice to at least get a span wrapped around that content, because right now, there are just three text strings running together, without even a space between them.

Does anyone know if there is a way around this default behavior in the Views UI? I have looked all through the table settings and the field settings and can't see anything that would permit me to get something wrapped around the content for the fields being so grouped. Ideally, I would like at least a span or div wrapped around those items being grouped, so that the won't run together.

πŸ› Bug report
Status

Postponed: needs info

Version

11.0 πŸ”₯

Component
ViewsΒ  β†’

Last updated about 12 hours ago

Created by

πŸ‡ΊπŸ‡ΈUnited States RKopacz

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡¦πŸ‡ΊAustralia pameeela

    I'm not sure whether something has changed, but I can't reproduce the HTML stripping here. If I have a field with HTML, it displays the same way whether it its own column or grouped.

    Fields displayed in the same column:

    <td headers="view-title-table-column--n_pwIg-AmyE" class="views-field views-field-title views-field-body">
    <a href="/node/470" hreflang="en" data-once="views-ajax">Test with comments</a>
    <p>Body text here with <strong>some HTML</strong>.</p>
    <a href="/node/470/edit?destination=/admin/structure/views/view/duplicate_of_manage_corporate_active_requests/preview/page_1%3F_wrapper_format%3Ddrupal_ajax" hreflang="en" data-once="views-ajax">edit</a>
    </td>

    Fields displayed in separate columns:

    <td headers="view-title-table-column--N3fpHc6FMWU" class="views-field views-field-title">
    <a href="/node/470" hreflang="en" data-once="views-ajax">Test with comments</a>
     </td>
    <td headers="view-body-table-column--Dxql8bimhMU" class="views-field views-field-body">
    <p>Body text here with <strong>some HTML</strong>.</p>
    </td>
    <td headers="view-edit-node-table-column--8z0MW96QIvM" class="views-field views-field-edit-node">
    <a href="/node/469/edit?destination=/admin/structure/views/view/duplicate_of_manage_corporate_active_requests/preview/page_1%3F_wrapper_format%3Ddrupal_ajax" hreflang="en" data-once="views-ajax">edit</a>
    </td>

    If the OP or anyone else has info on how to reproduce, please update the issue summary with specific steps. If that is not provided, this issue may be closed after 3 months.

Production build 0.71.5 2024