<p><a href="https://github.com/ehousestudio/craft_hacksaw">Hacksaw</a> has an <code>allow</code> parameter where you specify which HTML tags you want it to pass through. </p>

<p>You might want to try something like:</p>

<pre><code>{{ workItem.summary | hacksaw(words='75', append='...', allow='&lt;strong&gt;&lt;em&gt;&lt;br&gt;&lt;p&gt;') }}
</code></pre>

<p>That allows <code>p</code>, <code>br</code>, <code>strong</code>, and <code>em</code> tags to pass through untouched. If you need to allow others, just add 'em to the list.</p>

CC BY-SA 3.0
2016-02-15T16:12:16.413Z
2016-02-15T16:12:16.413Z
RitterKnight
<p>When I use the <a href="https://github.com/ehousestudio/craft_hacksaw" rel="nofollow">hacksaw</a> to truncate the formatting goes away.  If I remove hacksaw it comes back.  So, my question has changed, is there a way for me to truncate the text while keeping the formatting?</p>

<p>The return on the line below is from a rich text field and it will not show formatting unless I remove hacksaw.</p>

<pre><code> {{ workItem.summary | hacksaw(words='75', append='...') }}
</code></pre>

<plugins><plugin-hacksaw>
Hacksaw plugin breaking rich text field
# Hacksaw plugin breaking rich text field

(Asked by: username_0 on 2016-02-15)

When I use the hacksaw to truncate the formatting goes away.  If I remove hacksaw it comes back.  So, my question has changed, is there a way for me to truncate the text while keeping the formatting?
The return on the line below is from a rich text field and it will not show formatting unless I remove hacksaw.
 {{ workItem.summary | hacksaw(words='75', append='...') }}

**Tags:** plugins, plugin-hacksaw

---

## 1 answers

### Answer by username_1 on 2016-02-15. Score: 4 | Accepted answer

Hacksaw has an allow parameter where you specify which HTML tags you want it to pass through. 
You might want to try something like:
{{ workItem.summary | hacksaw(words='75', append='...', allow='') }}

That allows p, br, strong, and em tags to pass through untouched. If you need to allow others, just add 'em to the list.


---

