- Merge request !559[#3549113] feat: ECA Render: Not possible to use markup within render arrays of some elements → (Merged) created by jurgenhaas
There are occasions where it is useful to insert links or other markup into render elements that escape input strings by default. In code, you would do this by wrapping the markup string with a TranslatableMarkup or FormattableMarkup object, but in ECA there is no equivalent.
The ECA Render: Markup action generates a Markup object, but wraps it in a render array, making it impossible to use it inside of other render arrays (as this results in a "0 is not a valid render array key" error).
Even if it does work, it seems to require a very cumbersome approach of constructing a render array one key at a time (using "Token: set value" or "List: add item") just so that the Markup objects can be inserted without getting casted into strings by the yaml parser.
'#theme': 'status_messages'
'#message_list':
'status':
- '<strong>hello!</strong>'
Interpret above value as YAML format: yes
Active
3.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.