Why precisely the twig raw filter is insecure in the drupal context?
What would be an example of a potential threat ?
And what need to be done on the ckeditor field format side to protect potential malicious code, if the raw filter is used ?
Drupal Answers is a question and answer site for Drupal developers and administrators. It only takes a minute to sign up.
Sign up to join this communityWhy precisely the twig raw filter is insecure in the drupal context?
What would be an example of a potential threat ?
And what need to be done on the ckeditor field format side to protect potential malicious code, if the raw filter is used ?
Twig templates escape special characters to prevent potential hacking. Twig raw puts out the data without escaping it, meaning that if it is user-supplied data, it's insecure and could be used for hacking.
|raw
because the filtered markup is already marked as safe.