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 sure, if it's possible to escape variable as a Twig's variable and transform it to a Polymer's variable

By Twig's documentation, I've end up with this:

&lt;iron-media-query query="(min-width: 600px)" query-matches="'{{'{{queryMatches}}'}}'"&gt;




where it translates to:

&lt;iron-media-query query="(min-width: 600px)" query-matches="'{{queryMatches}}'"&gt;&lt;/iron-media-query&gt;


The goal is:

&lt;iron-media-query query="(min-width: 600px)" query-matches="{{queryMatches}}"&gt;&lt;/iron-media-query&gt;
You forgot to remove the outer single quotes in your first example

&lt;iron-media-query query="(min-width: 600px)" query-matches="{{'{{queryMatches}}'}}"&gt;


Try the raw filter if that doesnt work. More info on it here