eca_base: Provide a mechanic to recursively replace tokens
Problem/Motivation
In some situations, we have "tokens inside tokens".
Token replacement is being run on the given text once, it's not run recursively or something like that. That's why "tokens inside tokens" are not being replaced too. The reason behind that is a) performance and b) security - because the contained value may come from an untrusted source, and it would be a security risk to automatically replace tokens that is coming from a potentially untrusted source.
For the use case a user does want to replace "tokens inside tokens", we could provide an action to do so.
Steps to reproduce
Proposed resolution
I currently see two options:
- Provide a new action "Token: replace" that will replace all tokens as long until no more tokens exist in the text.
- Extend "Token: set value" with an option to enable recursive token replacement.
Remaining tasks
User interface changes
API changes
Data model changes
Edited by drupalbot