'Striptag only partial stripping
Got a particular case of striptags not stripping all tags.
{% if field_video|render|striptags %}
<li class="nav-item"><a data-toggle="tab" href="#product-vid">{{ field_video['#title'] }}</a></li>
{% endif %}
The above works in removing the "title" according to field value, but leaves the margins and background color. If I use |trim it removes everything, however if a field has "title" value it also strips it.
Additional things I have tried: |trim is not empty
What else should I look at?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|