- Issue created by @mciver87
- πΊπΈUnited States zengenuity
I think if we add this, it shouldn't use a #markup render array. That's too permissive. While that is filtered for XSS, it's not filtered for other restricted tags on the site, nor are any filters run to make sure the HTML is valid. You could have unclosed tags, for example, that would break the site formatting.
I think to add this, we would need two things:
1. Switch to using #processed_text instead of #markup.
2. Add a configuration option on the field formatter that allows you to select whether the contents of the CSV file should be rendered as plain text or formatted text. If formatted text is chosen, then you should be required to pick what text format to use from the available text formats on the website. That would then be used as the #format value when we render the results with #processed_text. We can use #plain_text if the plain text option is chosen.
- π¦πΊAustralia geoffreyr
I've got a case where I have a CSV with a lot of line breaks in the cells that I'd like to convert to HTML
<br />
markup (nl2br
style). This feature might allow for what I want to achieve, so I'll see if it's possible to render out the cells with a text filter set. - Merge request !2#3359118: Allow table cells to have text formats applied β (Open) created by geoffreyr
- Issue was unassigned.
- Status changed to Needs review
5 months ago 3:09am 1 August 2024