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.
| Comment | File | Size | Author |
|---|---|---|---|
| views_streaming_data-decode_entities.patch | 2.79 KB | rstaylor |
Issue fork views_streaming_data-3426732
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
pwolanin commentedWe should make an issue for and add tests
Comment #3
pwolanin commentedComment #5
pwolanin commentedComment #6
heddnLGTM.
BTW, you include phpstan previous/next and mark them as optional. Something like:
Comment #7
pwolanin commented