Advertisement
Guest User

Untitled

a guest
Oct 19th, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. ### The Problem:
  2. If you use `{{ some_item|striptags('<a><p><br>') }}`, then Drupal will render your content with the allowed tags URL encoded so that they appear on the page (rather than being the lovely, functional HTML they were *intended* to be...)
  3.  
  4. ### The Solution:
  5. Use `{{ some_item|striptags('<a><p><br>')|raw }}`, which tells Drupal to go ahead and render the specified tags (such as paragraphs or anchors) as actual tags, rather than translate them to text.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement