We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [escaping]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2
votes
2answers
621 views

Convert characters to Ascii

Is there a twig filter to encode special characters like umlauts: {{ entry.title | filter }} Datensätze & Karten Which then should result in: datensaetze-karten Basically what '...
1
vote
1answer
551 views

Remove Quotes from Text Fields

My client needs to input apostrophes in text fields for staff names, such as ’ or just the plain ' and as you can imagine, it is causing issues. I have tried this replace({'\'',''}) and this ...
2
votes
3answers
677 views

Escape characters in format

I'm trying to find a method of escaping characters in Craft's DateTime object. This is the output I'm trying to achieve: 16th January 2016 This is what I've tried: {{ article.postDate.format('j\<\...
1
vote
1answer
285 views

Ignore Twig's variable and transform it to Polymer's variable.

I've encountered on a problem with escaping, where I want some parts of code, not being translated by Twig. Straight to the problem. Polymer, uses the same marking for variables as Twig, and I'm not ...
1
vote
2answers
590 views

Plain text field - apostrophes are getting escaped

I have a plain text field in Craft and the content has an apostrophe. On the front end, the apostrophe gets turned into &#039; Not ideal! Thanks in advance..
2
votes
1answer
240 views

Convert textfield to be used in html class or id?

Does anyone know if it is possible to apply a Twig filter or use escaping to convert a Craft textfield into a html class/id safe string?
2
votes
3answers
492 views

How to use “&amp;” in richtext?

I'm currently finishing a client-website which has to be 100% valid HTML5. For one of the sections, I am using a matrix containing rich-text fields. This content is simply shown on the front page. The ...
12
votes
2answers
10k views

How to output a field as raw HTML?

I have a field in a matrix block that is used for video embed codes. I want to output the contents of that field directly as HTML. However, it always seems to get entity-encoded (ie. the < and > ...
3
votes
1answer
4k views

How can I escape Twig code to prevent it from being parsed?

How do I escape Twig code to prevent it from being processed?