Rendering fields with trusted html

Created on 4 November 2022, about 2 years ago
Updated 16 June 2023, over 1 year ago

Problem/Motivation

I'm creating a view using a trusted HTML source. I have 'Trusted' enabled for the view, but my iFrame tags don't come through as expected.

Steps to reproduce

Setup a view using Json-json-source where the markup being pulled in for the field includes an iFrame tag. The iframe gets stripped out.

Proposed resolution

Looking at the code, the module is using #markup to render the HTML. If #markup were changed to #children on line 37 of ViewsJsonField.php, this would work as I expect it to. But does it cause other concerns?

I currently have this modified in my system but do not want to maintain the change going forward through upgrades. Could we change to #children officially? Could we add an option so the user can toggle between #markup and #children? What other option is there to display an embedded iFrame?

Feature request
Status

Fixed

Version

1.4

Component

Code

Created by

🇺🇸United States simonjoe

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.

Production build 0.71.5 2024