Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

No way of escaping {{...}} #186

Open
nevir opened this issue Sep 6, 2014 · 1 comment
Open

No way of escaping {{...}} #186

nevir opened this issue Sep 6, 2014 · 1 comment

Comments

@nevir
Copy link
Contributor

nevir commented Sep 6, 2014

Say I want to provide a code example, but I'm within a template (or the code example is dynamic). There doesn't appear to be any (clean) way of escaping the double curlies.

At first glance it seems like entity syntax should work {, but then you realize that the browser's decoding that before it's being passed to the template element. Further, the template element doesn't do any extra entity decoding (i.e. { is a no go, and is really ugly anyway). Seems like entity syntax isn't a great approach here.

\{\{...\}\} maybe?

@erikringsmuth
Copy link

To display {{var}} you can use {{'\{{var}\}'}}. It's really ugly though! I asked the same question on StackOverflow a while ago http://stackoverflow.com/questions/24966597/how-do-you-escape-braces-var-in-a-polymer-template.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants