Tokens that are registered in the allowed_tokens settings but have no value do not get replaced. IMO The expected behaviour would be for any token registered by this module to get replaced 1) by the value 2) by a blank space if no value was given. We should not be allowing the raw token to be rendered.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | replace_all_known_values-2861549-2.patch | 993 bytes | kalpaitch |
Comments
Comment #2
kalpaitch commentedWould be great to get this in, thanks.
Comment #4
davidgrayston commentedToken Filter module is replacing the tokens but not clearing empty values – there is an issue open #2331901 to allow this to be optional.
We want the default behaviour to clear the empty tokens so I've applied the patch, which is working as expected. If #2331901 is applied and ported to 8.x of Token Filter we may want use that option instead.
Comment #6
davidgrayston commentedPHP notice was being generated when $replacementValues[$name] was not set – I've fixed this and retagged.