Skip to main content
added 37 characters in body
Source Link
Jaypan
  • 18.2k
  • 3
  • 36
  • 68

I believe you should use:

'#test' => check_markup($node->get('body')->safe_value;>value, $node->get('body')->format); 

At which point the data will be safely escaped, and therefore this is safe:

{{ test.body.value|raw }} 

I believe you should use:

'#test' => $node->get('body')->safe_value; 

At which point the data will be safely escaped, and therefore this is safe:

{{ test.body.value|raw }} 

I believe you should use:

'#test' => check_markup($node->get('body')->value, $node->get('body')->format); 

At which point the data will be safely escaped, and therefore this is safe:

{{ test.body.value|raw }} 
Source Link
Jaypan
  • 18.2k
  • 3
  • 36
  • 68

I believe you should use:

'#test' => $node->get('body')->safe_value; 

At which point the data will be safely escaped, and therefore this is safe:

{{ test.body.value|raw }}