<p>You can use Twig's <a href="http://twig.sensiolabs.org/doc/filters/raw.html" rel="nofollow">"raw" filter</a> to prevent the HTML from being escaped</p>

<pre><code>{{ cycle(['&lt;div&gt;&lt;/div&gt;', '2', '3', '4'], loop.index0)|raw }}
</code></pre>

CC BY-SA 3.0
2015-04-29T14:00:33.707Z
2015-04-29T14:00:33.707Z
Dylan T
<p>Is this normal behavior?</p>

<pre><code>{% for entry in entries %} 
{{ cycle(['&lt;div&gt;&lt;/div&gt;', '2', '3', '4'], loop.index0) }}
{% endfor %}
</code></pre>

<p>Results in: </p>

<pre><code>&amp;lt;div&amp;gt;&amp;lt;/div&amp;gt;

2

3

4
</code></pre>

<p>is there a way to force the output as it is?</p>

<cycle><output>
Cycle outputs plain text, should be html
# Cycle outputs plain text, should be html

(Asked by: username_0 on 2015-04-29)

Is this normal behavior?
{% for entry in entries %} 
{{ cycle(['', '2', '3', '4'], loop.index0) }}
{% endfor %}

Results in: 
<div></div>

2

3

4

is there a way to force the output as it is?

**Tags:** cycle, output

---

## 1 answers

### Answer by username_1 on 2015-04-29. Score: 3 | Accepted answer

You can use Twig's "raw" filter to prevent the HTML from being escaped
{{ cycle(['', '2', '3', '4'], loop.index0)|raw }}


---

