question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Question: How to escape the template engine syntax?

See original GitHub issue

For example, let’s say I have an HTML page that has some inline javascript, like the below one.

console.log(`testing ${myVar}`);

How can I escape the jte syntax so to say, in that piece of code, to make sure it won’t be processed?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:19 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
casidcommented, Feb 27, 2022

@renannprado jte 2 is finally released, containing this feature!

I’ve updated the documentation this morning, so I think everything’s done now.

Thank you for suggesting this feature and sorry it took so long! But I really like the end result 😃

1reaction
casidcommented, Feb 20, 2022

Thanks for giving it a shot!

Yeah, the autocompletion is done via live templates, I think to prevent those they’d need to be implemented by hand.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to escape template syntax in templates - Stack Overflow
I couldn't find anything in the Play Framework documentation that explains how to escape Play's template syntax in a template. Does anyone know...
Read more >
Frequently Asked Questions — Jinja Documentation (3.0.x)
With explicit escaping however the template engine doesn't have to perform any safety checks on variables. Also a human knows not to escape...
Read more >
Twig for Template Designers - Documentation - Twig - The ...
This document describes the syntax and semantics of the template engine and will be most ... Twig supports both, automatic escaping is enabled...
Read more >
tornado.template — Flexible output generation
We provide the functions escape() , url_escape() , json_encode() , and squeeze() to all templates by default. Typical applications do not create Template...
Read more >
The Django template language - Django documentation
This document explains the language syntax of the Django template system. ... When the template engine encounters a variable, it evaluates that variable...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found