Add option to decode HTML entities

Created on 8 March 2024, 4 months ago

Problem/Motivation

The "strip tags" option does both decoding entities and stripping tags, but in some cases you may want to decode entities but not run strip_tags on the output.

An example case is where output contains < and > which strip_tags would misinterpret and truncate data, and where the field output is passed through the rendering system and ends up with entities encoded but the exported CSV data should not be HTML encoded.

Steps to reproduce

Create a view with a streaming data export display. Use "CSV streaming Serializer" format with "Strip tags" option selected. Populate data such that one of the fields contains data such as ">10% and <50% completed".

Note that on export, the output from "<" is truncated by strip_tags().

Proposed resolution

Add an option to decode entities without running strip_tags.

User interface changes

Added "Decode HTML entities" option in format settings.

✨ Feature request
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States RSTaylor

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

Comments & Activities

Production build 0.69.0 2024