Do not decode sanitized entity properties

Created on 26 May 2023, over 1 year ago
Updated 31 August 2023, about 1 year ago

Define a custom node property as

[
  'type' => 'text',
  'sanitized' => TRUE,
  'computed' => TRUE,
  ...
]

Call token_replace

// Returns correct html.
print token_replace('[node:x]', ['node' => $node], ['sanitize' => TRUE]);
// Returns empty string.
print token_replace('[node:x]', ['node' => $node], ['sanitize' => FALSE]);

The sanitize option should not affect the output for already sanitized tokens.

πŸ› Bug report
Status

Needs work

Version

1.0

Component

Entity tokens

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024