I want to strip every headline tag from all Rich Text fields site-wide.
So I thought about adding a replace filter.
But since this will be site wide I wanted to write the replace rules in a variable:
{% set replaceHeadline = '"<h1>" : "<p>", "</h1>" : "</p>"' %}
{{ entry.richText | replace({replaceHeadline}) | raw }}
This produces the error:
A hash key must be followed by a colon (:). Unexpected token "punctuation" of value "}" ("punctuation" expected with value ":").
Is this not possible? Is concatenation with ~
somehow the way to go?
Is there a more sane approach to stripping all headline tags from Rich Text fields?