Hacksaw replacing "&" with "&amp;" I'm using the Hacksaw plugin to truncate text and it does a great job except instead of rendering HTML entities such as "&amp;", it's outputting them as "&amp;amp;". How can I correct this? Putting them in allow="" doesn't work. Do I need to do something to manipulate the text string first before applying the Hacksaw filter? Or is there a Hacksaw option that would correct this?

Edit for more info...

Example of text as it should appear:

Colour &amp; Light; A House Re-crafted, cover &amp; pg.99-108


Example of text output from Hacksaw:

Colour &amp;amp;amp; Light; A House Re-crafted, cover &amp;amp;amp; pg.99-108


Stupidly I hadn't looked at the HTML until now. It looks like the first &amp;amp; is rendering correctly but then there's a second partial entity after it?!

Template code I've tried:

{% set summary = article.newsArticle.type('text').first().text|hacksaw(words='35', append='...') %}

{% set summary = article.newsArticle.type('text').first().text|hacksaw(words='35', append='...')|raw %}

{% set summary = article.newsArticle.type('text').first().text|raw|hacksaw(words='35', append='...') %}


The order of plugin doesn't appear to have any effect. I get same result with all three of these arrangment above, including no Raw plugin at all.

Edit for answer

As per accepted answer below, final working code is:

{% set summary = article.newsArticle.type('text').first().text|htmlEntityDecode|hacksaw(words='35', append='...') %}


The Craft Helpers plugins did the trick.
You could try to fight that ampersand with the htmlEntityDecode filter that is included in my Craft Helpers plugin https://github.com/carlcs/craft-helpers